From c4b3b3f7639a2ca1b60790c0bc55fe0610532d2b Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Mon, 16 Jun 2025 18:48:22 -0600 Subject: [PATCH] make auth token configurable via env var --- server/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/index.ts b/server/src/index.ts index 38d62b71..67bac919 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -89,7 +89,7 @@ app.use((req, res, next) => { const webAppTransports: Map = new Map(); // Web app transports by web app sessionId const serverTransports: Map = new Map(); // Server Transports by web app sessionId -const sessionToken = randomBytes(32).toString("hex"); +const sessionToken = process.env.MCP_PROXY_AUTH_TOKEN || randomBytes(32).toString("hex"); const authDisabled = !!process.env.DANGEROUSLY_OMIT_AUTH; // Origin validation middleware to prevent DNS rebinding attacks