revert mTLS location excluding acme-challenge since each location will match ultimately resulting in 404 for all request paths

This commit is contained in:
Marco Boss 2024-03-09 00:02:39 +01:00
parent 6680b5059b
commit 8f59f6fcc5
No known key found for this signature in database
GPG key ID: 8ADD63FB98A9AF21

View file

@ -985,10 +985,8 @@ stream {
{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
location ~ ^/(?!(\.well-known/acme-challenge)) {
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
return 403 "client certificate unauthorized";
}
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
return 403 "client certificate unauthorized";
}
{{ end }}
{{ end }}