Skip to content

Commit

Permalink
[mTLS] Fix acme verfication when mTLS and Client CN verification is e…
Browse files Browse the repository at this point in the history
…nabled
  • Loading branch information
bossm8 committed Mar 4, 2024
1 parent a41f46a commit 33b18c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 33b18c3

Please sign in to comment.