Caddy basic auth: need to login on every webpage

Started by dinguz, March 11, 2026, 07:45:48 AM

Previous topic - Next topic
I tried to enable basic auth in Caddy to protect from brute-force attacks; I have done so by enabling basic auth on the domain. When testing this, I noticed I need to re-enter my credentials on every webpage I browse to. Somehow it doesn't stick.
A chatgpt consultation finds issues with the generated config file, but because it's generated by the GUI I am not able to try out any of the suggestions which would require manual editing of the config file, or make the changes permanent after that.
What would be the best way to proceed here?
In theory there is no difference between theory and practice. In practice there is.

If you feel like there are issues with the generated configuration please first ask in the Caddy community and provide them your Caddyfile.

AI will lie to you about all of this and send you down a rabbithole.

https://caddy.community/

If something is indeed wrong with the config generation please open an issue for me here so it can be fixed.

https://github.com/opnsense/plugins/issues
Hardware:
DEC740