You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CorsAllowAllMiddleware: invalid CORS headers and missing preflight handling #24
CorsAllowAllMiddleware sets CORS headers that are invalid per the Fetch CORS protocol and does not handle OPTIONS preflight correctly.
Problems
Invalid header combination
Sets both Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true.
This is forbidden by the CORS/Fetch spec; browsers reject credentialed cross-origin responses.
Ref: https://fetch.spec.whatwg.org/#cors-protocol-and-credentials
No preflight short-circuit
Always calls $handler->handle($request) first. An OPTIONS preflight without a matching route typically returns 405, so preflight fails.
Incorrect Allow: * Allow is not a CORS header; Allow: * is non-standard here.
Expected
Never combine * origin with credentials.
Answer preflight (OPTIONS + Access-Control-Request-Method) with 204 from the middleware, without routing.
Activity
samdark commentedon Aug 6, 2026
@Sakanweb please check #27
Sakanweb commentedon Aug 7, 2026
Looks good, thx