Skip to content

Commit 151237e

Browse files
committed
fix: delete token in mcp
1 parent 7a2774d commit 151237e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

projects/mcp_server/src/api/request.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { addLog } from '../utils/log';
2-
import { getCsrfToken } from '../../../app/src/web/common/utils/csrfToken';
32

43
type ConfigType = {
54
headers?: Record<string, string>;
@@ -90,15 +89,11 @@ async function request(url: string, data: any, config: ConfigType, method: strin
9089

9190
// Default timeout from config or 600 seconds
9291
const timeout = config.timeout || 600000;
93-
// prevent circular requests
94-
const isGenerateCsrfTokenRequest = url.includes('/support/user/account/generateCsrfToken');
95-
const csrfToken = isGenerateCsrfTokenRequest ? '' : await getCsrfToken();
9692

9793
const options: RequestInit = {
9894
method,
9995
headers: {
10096
'content-type': 'application/json',
101-
...(csrfToken && { 'x-csrf-token': csrfToken }),
10297
...config.headers
10398
},
10499
signal: AbortSignal.timeout(timeout)

0 commit comments

Comments
 (0)