* [mTLS] Fix acme verfication when mTLS and Client CN verification is enabled * revert mTLS location excluding acme-challenge since each location will match ultimately resulting in 404 for all request paths
This commit is contained in:
parent
157e53b814
commit
9c384c7eb8
1 changed files with 2 additions and 4 deletions
|
@ -985,10 +985,8 @@ stream {
|
||||||
|
|
||||||
{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
|
{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
|
||||||
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
|
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
|
||||||
location ~ ^/(?!(\.well-known/acme-challenge)) {
|
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
|
||||||
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
|
return 403 "client certificate unauthorized";
|
||||||
return 403 "client certificate unauthorized";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue