Skip to content

Commit

Permalink
Merge pull request #1303 from rommapp/romm-1218
Browse files Browse the repository at this point in the history
[ROMM-1218] Exempt the right path from CSRF protection for tokens
  • Loading branch information
gantoine authored Nov 17, 2024
2 parents 4ecbac7 + f5941ec commit 8f9eb01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
CustomCSRFMiddleware,
cookie_name="romm_csrftoken",
secret=ROMM_AUTH_SECRET_KEY,
exempt_urls=[re.compile(r"^/token.*"), re.compile(r"^/ws")],
exempt_urls=[re.compile(r"^/api/token.*"), re.compile(r"^/ws")],
)

# Handles both basic and oauth authentication
Expand Down

0 comments on commit 8f9eb01

Please sign in to comment.