MCPcopy Create free account
hub / github.com/garrytan/gstack / validateAuth

Function validateAuth

browse/src/server.ts:1574–1577  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

1572 // auth check sees the same token the routes receive. Module-level
1573 // validateAuth was deleted in v1.35.0.0.
1574 function validateAuth(req: Request): boolean {
1575 const header = req.headers.get('authorization');
1576 return header === `Bearer ${authToken}`;
1577 }
1578
1579 // Factory-scoped shutdown. Closes the cfg-provided browserManager so
1580 // embedders that pass their own BrowserManager get correct teardown.

Callers 1

makeFetchHandlerFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected