fix: make /api/hot-topics public — dashboard fetch has no auth token
This commit is contained in:
parent
e6d042f827
commit
7c7d9f7b51
@ -56,9 +56,10 @@ app.use("/api/proxy", proxyRouter);
|
||||
|
||||
// All other API routes require a valid token
|
||||
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("/proxy")) return next();
|
||||
if (req.path.startsWith("/hot-topics")) return next();
|
||||
requireAuth(req, res, next);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user