[mTLS] Fix acme verfication when mTLS and Client CN verification is enabled (#11062)
This commit is contained in:
parent
f3a4f07174
commit
7d12628208
1 changed files with 4 additions and 2 deletions
|
@ -985,8 +985,10 @@ stream {
|
|||
|
||||
{{ if not ( empty $server.CertificateAuth.MatchCN ) }}
|
||||
{{ if gt (len $server.CertificateAuth.MatchCN) 0 }}
|
||||
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
|
||||
return 403 "client certificate unauthorized";
|
||||
location ~ ^/(?!(\.well-known/acme-challenge)) {
|
||||
if ( $ssl_client_s_dn !~ {{ $server.CertificateAuth.MatchCN }} ) {
|
||||
return 403 "client certificate unauthorized";
|
||||
}
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue