Skip to content

Commit 9be1e59

Browse files
authored
fix: delete "Content-Length" while redirect request to pro api (#5589)
1 parent c67e645 commit 9be1e59

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/service/common/api/plusRequest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ interface ResponseDataType {
2222
* 请求开始
2323
*/
2424
function requestStart(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig {
25+
if (config.headers) {
26+
delete config.headers['content-length'];
27+
}
2528
return config;
2629
}
2730

projects/app/src/pages/api/support/outLink/feishu/[token].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function handler(
1111
): Promise<void> {
1212
// send to pro
1313
const { token } = req.query;
14-
const result = await POST<any>(`support/outLink/feishu/${token}`, req.body, {
14+
const result = await POST<any>(`/support/outLink/feishu/${token}`, req.body, {
1515
headers: req.headers as any
1616
});
1717
res.json(result);

0 commit comments

Comments
 (0)