added local access to nginx filter

This commit is contained in:
2026-01-20 18:14:08 +01:00
parent 99548a235e
commit 3cdcf44641
31 changed files with 190 additions and 38 deletions
+5 -1
View File
@@ -573,7 +573,11 @@ metadata:
external-dns.alpha.kubernetes.io/hostname: grafana.dooplex.hu,grafana.home
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($geoip2_country_code != "HU") {
set $geo_allowed 0;
if ($remote_addr ~ "^192\.168\.") { set $geo_allowed 1; }
if ($remote_addr ~ "^10\.") { set $geo_allowed 1; }
if ($geoip2_country_code = "HU") { set $geo_allowed 1; }
if ($geo_allowed = 0) {
return 403 "Access restricted to Hungary";
}
spec: