fix: add /api/v1/scan to JWT public paths (demo scanner bypass auth)

This commit is contained in:
DmitrL-dev 2026-03-23 20:32:11 +10:00
parent b958ed07bd
commit a120aa2750

View file

@ -24,8 +24,15 @@ func NewJWTMiddleware(secret []byte) *JWTMiddleware {
secret: secret,
PublicPaths: map[string]bool{
"/health": true,
"/healthz": true,
"/readyz": true,
"/metrics": true,
"/api/auth/login": true,
"/api/auth/refresh": true,
"/api/auth/register": true,
"/api/auth/verify": true,
"/api/auth/plans": true,
"/api/v1/scan": true, // public demo scanner
"/api/soc/events/stream": true, // SSE uses query param auth
"/api/soc/stream": true, // SSE live feed (EventSource can't send headers)
"/api/soc/ws": true, // WebSocket-style SSE push