mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
fix(wetter): mount routes before auth middleware
Weather data is public — no user-specific data involved. Move the wetter route registration above authMiddleware() so requests don't require a JWT token. Rate limiting still applies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
96a7202daa
commit
24704e28b6
1 changed files with 4 additions and 1 deletions
|
|
@ -51,6 +51,10 @@ app.notFound(notFoundHandler);
|
|||
app.use('*', cors({ origin: CORS_ORIGINS, credentials: true }));
|
||||
app.route('/health', healthRoute('mana-api'));
|
||||
app.use('/api/*', rateLimitMiddleware({ max: 200, windowMs: 60_000 }));
|
||||
|
||||
// Public routes — no auth required (weather data is public)
|
||||
app.route('/api/v1/wetter', wetterRoutes);
|
||||
|
||||
app.use('/api/*', authMiddleware());
|
||||
|
||||
// ─── MCP Endpoint ──────────────────────────────────────────
|
||||
|
|
@ -76,7 +80,6 @@ app.route('/api/v1/traces', tracesRoutes);
|
|||
app.route('/api/v1/presi', presiRoutes);
|
||||
app.route('/api/v1/research', researchRoutes);
|
||||
app.route('/api/v1/who', whoRoutes);
|
||||
app.route('/api/v1/wetter', wetterRoutes);
|
||||
|
||||
// ─── Server Info ────────────────────────────────────────────
|
||||
console.log(`mana-api starting on port ${PORT}...`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue