Tls directives extends the "clients" option to all server

I’m trying to setup caddy to have letsencrypt everywhere and client authentication for one website.

As soon as I add one tls { clients ... } directive it seems it is applied on all websites. Is it expected ? What am I doing wrong ?

This is my (simplified) config:

https://website-with-client-auth {
	tls {
	    clients /etc/caddy/server-management.crt
        }

	proxy / http://target-server
}

https://website-without-client-auth {
		proxy /florent http://127.0.0.1:59756/ {
		without /florent
		header_upstream X-Forwarded-Proto {scheme}
		header_upstream X-Forwarded-For {remote}
		header_upstream Host {host}
		websocket
	}
	cors {
		allow_credentials true
	}
}

I just found out about there’s an issue around this : #849 - https://github.com/mholt/caddy/issues/849
I think you should mark it as a known issue in the documentation, it’s definitely confusing.

Good point, we should clarify this in the docs. I’ve updated them locally and they’ll go out in the next deploy.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.