fix(api): skip CSRF for Bearer-authenticated API clients #622

Merged
jason.woltje merged 1 commits from fix/csrf-bearer-bypass into main 2026-03-01 19:06:15 +00:00
Owner

CSRF protection is only relevant for cookie-based sessions. Requests using Authorization: Bearer are not CSRF-vulnerable — malicious sites cannot inject Authorization headers. This change skips CSRF validation when a Bearer token is present, enabling programmatic API access from agents and service accounts.

CSRF protection is only relevant for cookie-based sessions. Requests using Authorization: Bearer are not CSRF-vulnerable — malicious sites cannot inject Authorization headers. This change skips CSRF validation when a Bearer token is present, enabling programmatic API access from agents and service accounts.
jason.woltje added 1 commit 2026-03-01 19:01:37 +00:00
fix(api): skip CSRF for Bearer-authenticated requests
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
97b14edbaa
jason.woltje merged commit 99a4567e32 into main 2026-03-01 19:06:15 +00:00
Sign in to join this conversation.