fix(auth): add CORS headers to BetterAuth raw HTTP handler #112

Merged
jason.woltje merged 1 commits from fix/auth-cors-headers into main 2026-03-15 16:47:28 +00:00

1 Commits

Author SHA1 Message Date
394f4f9fab fix(auth): add CORS headers to BetterAuth raw HTTP handler
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
The auth handler uses Fastify's onRequest hook with reply.hijack(),
which bypasses all NestJS middleware including CORS. Manually set
Access-Control-Allow-* headers on the raw response and handle OPTIONS
preflight before delegating to BetterAuth's node handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 11:47:02 -05:00