Skip to content
Discussion options

You must be logged in to vote

With Caddy forward auth, a Basic credential that doesn't resolve gets a 302 to the login page, not a 401. That's why curl -L ends on a 200 login page. The account password never works for Basic auth; you need an app password.

What the code does at eebd7de7 (main, not necessarily your release):

  • Caddy calls check_auth, and if that fails it calls auth_start, which always returns a 302 to the authorize URL (forward.rs#L111-L122, mod.rs#L85-L127).
  • The 401 for "Intercept header authentication" lives in redirect_to_start, which the Caddy path doesn't call (mod.rs#L142-L156). Only proxy mode reaches it (proxy.rs#L44). nginx returns 401 directly (forward.rs#L196). The docs say Basic failures retu…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JumpyLionnn
Comment options

Answer selected by JumpyLionnn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants