mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 01:16:01 +00:00
fix: delete "Content-Length" while redirect request to pro api (#5589)
This commit is contained in:
@@ -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(
|
|||||||
): 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);
|
||||||
|
Reference in New Issue
Block a user