Commit 9be1e591 by 伍闲犬 Committed by GitHub

fix: delete "Content-Length" while redirect request to pro api (#5589)

parent c67e6454
...@@ -22,6 +22,9 @@ interface ResponseDataType { ...@@ -22,6 +22,9 @@ interface ResponseDataType {
* 请求开始 * 请求开始
*/ */
function requestStart(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig { function requestStart(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig {
if (config.headers) {
delete config.headers['content-length'];
}
return config; return config;
} }
......
...@@ -11,7 +11,7 @@ async function handler( ...@@ -11,7 +11,7 @@ async function handler(
): Promise<void> { ): Promise<void> {
// send to pro // send to pro
const { token } = req.query; const { token } = req.query;
const result = await POST<any>(`support/outLink/feishu/${token}`, req.body, { const result = await POST<any>(`/support/outLink/feishu/${token}`, req.body, {
headers: req.headers as any headers: req.headers as any
}); });
res.json(result); res.json(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment