fix: exempt /chat/login and /chat/oauth/callback from forward_auth (#709)
Caddy forward_auth on /chat/* blocked unauthenticated users from reaching the OAuth login/callback routes (401 instead of redirect). Add explicit handle blocks for these public routes before the forward_auth catch-all. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f8ac1d2ae2
commit
ff79e64fc8
1 changed files with 7 additions and 0 deletions
|
|
@ -615,6 +615,13 @@ _generate_caddyfile_impl() {
|
|||
}
|
||||
|
||||
# Chat service — reverse proxy to disinto-chat backend (#705)
|
||||
# OAuth routes bypass forward_auth — unauthenticated users need these (#709)
|
||||
handle /chat/login {
|
||||
reverse_proxy chat:8080
|
||||
}
|
||||
handle /chat/oauth/callback {
|
||||
reverse_proxy chat:8080
|
||||
}
|
||||
# Defense-in-depth: forward_auth stamps X-Forwarded-User from session (#709)
|
||||
handle /chat/* {
|
||||
forward_auth chat:8080 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue