Skip to content

Commit c4b3b3f

Browse files
authored
make auth token configurable via env var
1 parent 9051727 commit c4b3b3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ app.use((req, res, next) => {
8989
const webAppTransports: Map<string, Transport> = new Map<string, Transport>(); // Web app transports by web app sessionId
9090
const serverTransports: Map<string, Transport> = new Map<string, Transport>(); // Server Transports by web app sessionId
9191

92-
const sessionToken = randomBytes(32).toString("hex");
92+
const sessionToken = process.env.MCP_PROXY_AUTH_TOKEN || randomBytes(32).toString("hex");
9393
const authDisabled = !!process.env.DANGEROUSLY_OMIT_AUTH;
9494

9595
// Origin validation middleware to prevent DNS rebinding attacks

0 commit comments

Comments
 (0)