From 1894ccf3c3dae45e840920b0bdb31d09d5034770 Mon Sep 17 00:00:00 2001 From: shudarshon-binary Date: Wed, 24 Nov 2021 13:46:11 +0800 Subject: [PATCH] Edit: added redirection for specified country list --- default.conf | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/default.conf b/default.conf index 758978854f..42dfecb2f4 100644 --- a/default.conf +++ b/default.conf @@ -1,6 +1,42 @@ +map $http_cf_ipcountry $redirect_country { + default no; + IT yes; + DE yes; + FR yes; + LU yes; + GR yes; + ES yes; + SK yes; + LT yes; + NL yes; + AT yes; + BG yes; + SI yes; + CY yes; + BE yes; + RO yes; + HR yes; + PT yes; + PL yes; + LV yes; + EE yes; + CZ yes; + FI yes; + HU yes; + DK yes; + SE yes; + IE yes; + GB yes; + MT yes; +} + server { listen 80; - server_name localhost; + server_name _; + + if ($redirect_country = yes ) { + return 301 https://binary.com/move-to-deriv/; + } add_header Cache-Control "public, max-age=7200, s-maxage=600, must-revalidate"; charset UTF-8; @@ -11,7 +47,9 @@ server { return 503; } - location ~ /\.git { + location ~ /\. { + access_log off; + log_not_found off; return 404; }