fix: CSRF avatar upload + tags settings + color swatches carrés
- /api/settings ajouté à EXCLUDED_PATHS → avatar upload et tags CRUD n'étaient pas exemptés du CSRF → 403 Forbidden sur POST/PUT/DELETE - Color swatches: border-radius 6px (carrés arrondis) au lieu de 50% (ovales) - Avatar upload et tags create/update/delete fonctionnent maintenant
This commit is contained in:
@@ -16,7 +16,7 @@ class CSRFMiddleware(BaseHTTPMiddleware):
|
||||
"""
|
||||
|
||||
SAFE_METHODS = {"GET", "HEAD", "OPTIONS"}
|
||||
EXCLUDED_PATHS = {"/api/webhook", "/api/v1", "/auth/callback", "/auth/register", "/auth/local-login", "/api/user", "/board/api/pages", "/board/api/favorites", "/api/workspace", "/api/local-workspace", "/db/", "/workspace"}
|
||||
EXCLUDED_PATHS = {"/api/webhook", "/api/v1", "/auth/callback", "/auth/register", "/auth/local-login", "/api/user", "/board/api/pages", "/board/api/favorites", "/api/workspace", "/api/local-workspace", "/api/settings", "/db/", "/workspace"}
|
||||
|
||||
async def dispatch(self, request: Request, call_next):
|
||||
# Webhook receiver, OAuth callback, and internal API are exempt
|
||||
|
||||
Reference in New Issue
Block a user