revert the change made
This commit is contained in:
@@ -9,19 +9,14 @@ upstream ${name_site}_backend {
|
||||
|
||||
server {
|
||||
server_name ${name_site}.tryton.geeraert.eu www.${name_site}.tryton.geeraert.eu;
|
||||
# if ($allowed_country = no) {
|
||||
# return 444; # Forbidden
|
||||
# # Or use 'return 444;' to close the connection without a response
|
||||
# # The 444 Status: If you want to save bandwidth and "ghost" attackers, use return 444;. It drops the connection immediately without even sending a "Forbidden" header.
|
||||
# }
|
||||
if ($allowed_country = no) {
|
||||
return 444; # Forbidden
|
||||
# Or use 'return 444;' to close the connection without a response
|
||||
# The 444 Status: If you want to save bandwidth and "ghost" attackers, use return 444;. It drops the connection immediately without even sending a "Forbidden" header.
|
||||
}
|
||||
|
||||
location / {
|
||||
if ($allowed_country = yes) {
|
||||
|
||||
proxy_pass %{ if proxy_pass_https}https%{else}http%{ endif }://${name_site}_backend;
|
||||
break;
|
||||
}
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
${extra-value-location}
|
||||
@@ -39,14 +34,6 @@ server {
|
||||
}
|
||||
%{ endif }
|
||||
|
||||
if ($ssl_client_verify != "SUCCESS") {
|
||||
# Not UK AND no valid cert? Blocked.
|
||||
return 403;
|
||||
}
|
||||
|
||||
# 3. If NOT from UK but HAS cert, let them in.
|
||||
proxy_pass %{ if proxy_pass_https}https%{else}http%{ endif }://${name_site}_backend;
|
||||
|
||||
|
||||
}
|
||||
location /.well-known/acme-challenge/ {
|
||||
|
||||
Reference in New Issue
Block a user