@@ -246,7 +246,7 @@ export function useConnection({
246
246
const proxyAuthToken = getMCPProxyAuthToken ( config ) ;
247
247
const headers : HeadersInit = { } ;
248
248
if ( proxyAuthToken ) {
249
- headers [ ' Authorization' ] = `Bearer ${ proxyAuthToken } ` ;
249
+ headers [ " Authorization" ] = `Bearer ${ proxyAuthToken } ` ;
250
250
}
251
251
const proxyHealthResponse = await fetch ( proxyHealthUrl , { headers } ) ;
252
252
const proxyHealth = await proxyHealthResponse . json ( ) ;
@@ -269,7 +269,7 @@ export function useConnection({
269
269
270
270
const isProxyAuthError = ( error : unknown ) : boolean => {
271
271
return (
272
- error instanceof Error &&
272
+ error instanceof Error &&
273
273
error . message . includes ( "Authentication required. Use the session token" )
274
274
) ;
275
275
} ;
@@ -335,7 +335,7 @@ export function useConnection({
335
335
const proxyAuthToken = getMCPProxyAuthToken ( config ) ;
336
336
const proxyHeaders : HeadersInit = { } ;
337
337
if ( proxyAuthToken ) {
338
- proxyHeaders [ ' Authorization' ] = `Bearer ${ proxyAuthToken } ` ;
338
+ proxyHeaders [ " Authorization" ] = `Bearer ${ proxyAuthToken } ` ;
339
339
}
340
340
341
341
// Create appropriate transport
@@ -356,7 +356,11 @@ export function useConnection({
356
356
fetch : (
357
357
url : string | URL | globalThis . Request ,
358
358
init : RequestInit | undefined ,
359
- ) => fetch ( url , { ...init , headers : { ...headers , ...proxyHeaders } } ) ,
359
+ ) =>
360
+ fetch ( url , {
361
+ ...init ,
362
+ headers : { ...headers , ...proxyHeaders } ,
363
+ } ) ,
360
364
} ,
361
365
requestInit : {
362
366
headers : { ...headers , ...proxyHeaders } ,
@@ -372,7 +376,11 @@ export function useConnection({
372
376
fetch : (
373
377
url : string | URL | globalThis . Request ,
374
378
init : RequestInit | undefined ,
375
- ) => fetch ( url , { ...init , headers : { ...headers , ...proxyHeaders } } ) ,
379
+ ) =>
380
+ fetch ( url , {
381
+ ...init ,
382
+ headers : { ...headers , ...proxyHeaders } ,
383
+ } ) ,
376
384
} ,
377
385
requestInit : {
378
386
headers : { ...headers , ...proxyHeaders } ,
@@ -388,7 +396,11 @@ export function useConnection({
388
396
fetch : (
389
397
url : string | URL | globalThis . Request ,
390
398
init : RequestInit | undefined ,
391
- ) => fetch ( url , { ...init , headers : { ...headers , ...proxyHeaders } } ) ,
399
+ ) =>
400
+ fetch ( url , {
401
+ ...init ,
402
+ headers : { ...headers , ...proxyHeaders } ,
403
+ } ) ,
392
404
} ,
393
405
requestInit : {
394
406
headers : { ...headers , ...proxyHeaders } ,
@@ -471,7 +483,8 @@ export function useConnection({
471
483
if ( isProxyAuthError ( error ) ) {
472
484
toast ( {
473
485
title : "Proxy Authentication Required" ,
474
- description : "Please enter the session token from the proxy server console in the Configuration settings." ,
486
+ description :
487
+ "Please enter the session token from the proxy server console in the Configuration settings." ,
475
488
variant : "destructive" ,
476
489
} ) ;
477
490
setConnectionStatus ( "error" ) ;
0 commit comments