fix: add /health endpoint before auth middleware for Docker healthcheck (was 401 with MCP_REQUIRE_AUTH=true)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 16s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 16s
This commit is contained in:
@@ -92,6 +92,10 @@ const app = express();
|
||||
app.use(cors());
|
||||
app.use(express.json({ limit: '10mb' }));
|
||||
|
||||
// ── Health (before auth middleware — used by Docker healthcheck) ────────────
|
||||
|
||||
app.get('/health', (req, res) => res.json({ ok: true, uptime: process.uptime() }));
|
||||
|
||||
// ── Auth Middleware ──────────────────────────────────────────────────────────
|
||||
|
||||
app.use(async (req, res, next) => {
|
||||
@@ -211,7 +215,7 @@ app.get('/', (req, res) => {
|
||||
name: 'Memento MCP Server',
|
||||
version: '3.2.0',
|
||||
status: 'running',
|
||||
endpoints: { mcp: '/mcp', health: '/', sessions: '/sessions' },
|
||||
endpoints: { mcp: '/mcp', health: '/health', sessions: '/sessions' },
|
||||
auth: { enabled: process.env.MCP_REQUIRE_AUTH === 'true' },
|
||||
tools: 22,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user