Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
hweawer committed Jan 8, 2025
1 parent 31184e9 commit 532a99a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions nginx/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,15 @@ var _nameToDefaultTemplate = map[string]string{
// DefaultClientVerification is the default nginx configuration for
// client verification in the server block.
const DefaultClientVerification = `
ssl_verify_client on;
ssl_verify_client optional;
set $required_verified_client 1;
# If the remote IP is 127.0.0.1, set ssl_verify_client to optional and allow no verification
if ($remote_addr = "127.0.0.1") {
ssl_verify_client optional;
set $required_verified_client 0;
}
# Check client verification status
set $verified_client $ssl_client_verify;
if ($required_verified_client = 1) {
if ($verified_client !~ ^SUCCESS$) {
return 403;
}
set $verfied_client $required_verified_client$ssl_client_verify;
if ($verfied_client !~ ^(0.*|1SUCCESS)$) {
return 403;
}
`

Expand Down

0 comments on commit 532a99a

Please sign in to comment.