Skip to main content

Stop Caddy From Repeating Basic Authentication Popup

server apps webserver
Table of Contents

Problem
#

I configured Caddy to do Basic Authentication before reverse proxying to another machine. But the authentication dialog challenge kept popping up in my browser, no matter how many times I’d entered my credentials.

Solution
#

Stop Caddy from passing authorization headers, by specifying header-up with a minus ("-") sign to remove it. You must also remove the Authorization headers from the error handler (handle_errors). For example:

my.domain.com {
        reverse_proxy my.other-domain.com:8001 {
                header_up -Authorization
        }
        basicauth * bcrypt {
                my_username my_encrypted_password
        }
        handle_errors {
                header -Authorization
        }
}

Related

Configure Browser To Trust Caddy Internal Tls Certificates
server apps webserver
Problem # The Caddy web server can auto-generate locally trusted internal TLS certificates.
Installing Oracle 11g Locally On Windows
server apps database
You can install a free copy of the Oracle 11g database for development purposes.
Moving Dokuwiki To A New Server
server apps wiki
A big advantage of a no-SQL wiki like Dokuwiki is that you can easily move it.