fix: make /api/hot-topics public — dashboard fetch has no auth token
This commit is contained in:
parent
6d7b067ca9
commit
a1223e8967
@ -56,9 +56,10 @@ app.use("/api/proxy", proxyRouter);
|
|||||||
|
|
||||||
// All other API routes require a valid token
|
// All other API routes require a valid token
|
||||||
app.use("/api", (req, res, next) => {
|
app.use("/api", (req, res, next) => {
|
||||||
// Always allow: health check, auth endpoints, proxy public routes
|
// Always allow: health check, auth endpoints, proxy public routes, hot-topics (public market data)
|
||||||
if (req.path.startsWith("/health") || req.path.startsWith("/auth")) return next();
|
if (req.path.startsWith("/health") || req.path.startsWith("/auth")) return next();
|
||||||
if (req.path.startsWith("/proxy")) return next();
|
if (req.path.startsWith("/proxy")) return next();
|
||||||
|
if (req.path.startsWith("/hot-topics")) return next();
|
||||||
requireAuth(req, res, next);
|
requireAuth(req, res, next);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user