Skip to content

我的vue网络请求一直出问题,不知道为什么,WPS在线文档的ariscript接口总是报错403 #48

@zerburlar

Description

@zerburlar

async function fetchData() {
try {
// 使用 axios 发起 POST 请求
const response = await axios.post('/kdocs/api/v3/ide/file/XXXXX(文件名)/script/XXXXXXXX(脚本webhook)/sync_task', {
Context: {
argv: {},
}
}, {
headers: {
'AirScript-Token': '这是我的令牌',
'Content-Type': 'application/json'
}
}
——————————上面是我的请求代码————————————
下面是我的代理代码,有一个代理是成功了的,但是WPS在线文档的ariscript接口代理有问题

resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
server: {
port: 5173,
proxy: {
'/kdocs/api': {
target: 'https://www.kdocs.cn/api',
changeOrigin: true,
// rewrite: (path) => path.replace(/^/kdocs/api/, '')
},
'/api': {
target: 'https://api.bimface.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^/api/, '')
}
},
cors: true
}
403403403

哪位大佬能帮帮忙😢😢😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions