This commit is contained in:
Timothy Jaeryang Baek committed 2025-09-08 19:12:20 +04:00
1 parent 4cea3a57be
commit 30d1dc2c60
2 files changed
+24 -2

No files matched your search

+12 -1
View File
@@ -354,8 +354,19 @@ export const getToolServersData = async (servers: object[]) => {
.filter((server) => server?.config?.enable)
.map(async (server) => {
let error = null;
let toolServerToken = null;
const auth_type = server?.auth_type ?? 'bearer';
if (auth_type === 'bearer') {
toolServerToken = server?.key;
} else if (auth_type === 'none') {
// No authentication
} else if (auth_type === 'session') {
toolServerToken = localStorage.token;
}
const data = await getToolServerData(
(server?.auth_type ?? 'bearer') === 'bearer' ? server?.key : localStorage.token,
toolServerToken,
(server?.path ?? '').includes('://')
? server?.path
: `${server?.url}${(server?.path ?? '').startsWith('/') ? '' : '/'}${server?.path}`