host: mount otel/routes before blog-routes so GET /otel isn't swallowed by /:slug
The otel dashboard route (GET /otel) is single-segment, so blog-routes' /:slug catch-all shadowed it (404 'no post: otel'); only /otel/stream (two segments) survived. Move otel/routes ahead of the blog routes. Live-only wiring fix (route order); no test change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -194,6 +194,7 @@ EPOCH=1
|
||||
# auto-mounts /login + /logout and wraps everything in the signed-session
|
||||
# middleware, so a browser logs in then publishes. The bearer resolver is a stub
|
||||
# (no API tokens configured) — browser session is the live auth path for now.
|
||||
# blog-routes LAST — its GET /:slug catch-all must not shadow the rest.
|
||||
echo "(eval \"(host/serve $PORT (list host/static-routes host/feed-routes host/relations-routes (host/blog-write-routes (fn (tok) nil)) host/blog-routes otel/routes))\")"
|
||||
# blog-routes LAST — its GET /:slug catch-all must not shadow the rest. otel/routes must
|
||||
# come BEFORE blog-routes, or GET /otel is swallowed by /:slug (only /otel/stream survives).
|
||||
echo "(eval \"(host/serve $PORT (list host/static-routes host/feed-routes host/relations-routes otel/routes (host/blog-write-routes (fn (tok) nil)) host/blog-routes))\")"
|
||||
} | exec "$SX_SERVER"
|
||||
|
||||
Reference in New Issue
Block a user