mirror of
https://github.com/syntrex-lab/gomcp.git
synced 2026-04-25 04:16:22 +02:00
fix: add /api/v1/scan to JWT public paths (demo scanner bypass auth)
This commit is contained in:
parent
b958ed07bd
commit
a120aa2750
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue