27 lines
485 B
Plaintext
27 lines
485 B
Plaintext
geo $ipv4 {
|
|
0.0.0.0/0 ipv4;
|
|
}
|
|
server {
|
|
#Listen SSL+HTTP/2
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
#Server Name here
|
|
|
|
include /etc/nginx/snippets/legacy-js.conf;
|
|
|
|
location / {
|
|
|
|
#normal location or proxy settings
|
|
|
|
# IP Legacy Banner
|
|
include /etc/nginx/snippets/legacy-banner.conf;
|
|
if ($ipv4 ~ "^$") {
|
|
set $legacy "<!-- uses IPv6 --></body>";
|
|
}
|
|
sub_filter "script-src 'unsafe-inline'" "script-src 'unsafe-inline'";
|
|
sub_filter "</body>" $legacy;
|
|
}
|
|
}
|
|
|