Skip to content

Commit

Permalink
v8.0
Browse files Browse the repository at this point in the history
+ DietPi-Software | Pi-hole: Fix/harden Nginx teleporter X-Frame-Origins header
  • Loading branch information
MichaIng committed Dec 16, 2021
1 parent cd3ac38 commit 81aee17
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .conf/dps_93/nginx.pihole.conf
Expand Up @@ -2,16 +2,16 @@

# Allow teleporter iframe on settings page
location ~ ^(?:/html|)/admin/scripts/pi-hole/php/teleporter\.php$ {
# PHP handler block
fastcgi_pass php;
include snippets/fastcgi-php.conf;

if ($http_referer !~ /admin/settings\.php) {
add_header X-Frame-Options "DENY";
}
if ($http_referer ~ /admin/settings\.php) {
add_header X-Frame-Options "SAMEORIGIN";
}

# Standard PHP handler block
try_files $uri $uri/ =404;
location ~ ^(?:/html|)/admin/.+\.php(?:$|/) {
fastcgi_pass php;
include snippets/fastcgi-php.conf;
}
}


Expand Down

0 comments on commit 81aee17

Please sign in to comment.