fix: /images/ public (no Bearer auth required)

This commit is contained in:
hermes committed 2026-07-10 01:03:56 +02:00
1 parent 08a26138f3
commit 35eb411370
1 file changed
+2 -2
+2 -2
View File
@@ -556,8 +556,8 @@ await mcpServer.connect(mcpTransport);
const httpServer = http.createServer(async (req, res) => {
const url = new URL(req.url, `http://${req.headers.host || 'localhost'}`);
// Auth gate — skip /health only
if (!url.pathname.startsWith('/health')) {
// Auth gate — skip /health and /images/
if (!url.pathname.startsWith('/health') && !url.pathname.startsWith('/images/')) {
const auth = req.headers.authorization || '';
const expected = `Bearer ${MCP_TOKEN}`;
if (auth !== expected) {