is there already a new solution for Version 6?
I'm facing the same problem, could not find an option in the config toml. Maybe it's possible to add this as a configuration option for the next release?
Only idea I have is to add a proxy and modify the headers but I think it is overkill to run a proxy only for the purpose of displaying pihole in an iframe.
Lighttpd is no longer used with V6 as it now has a build-in webserver.
If you want to modify replies your best bet would be to setup lighttpd to work as reverse proxy to Pi-hole's webserver. In this scenario you would set Pi-hole webserver to listen on 127.0.0.1:8080 and lighttpd on :80.
Example config for lighttpd:
server.modules += ( "mod_proxy" )
$HTTP["host"] == "pi.hole" {
proxy.server = ( "" => ( "" => ( "host" => "127.0.0.1", "port" => 8080 ) ) )
# here you can modify replies using lighttpd configuration docs
# set for specific path only
$HTTP["url"] =~ "^/admin" {
setenv.add-response-header = ( "X-Frame-Options" => "ALLOW" )
}
# set for any path
setenv.set-response-header = ( "X-Frame-Options" => "ALLOW" )
}
and in pihole.toml set:
[webserver]
port = "127.0.0.1:8080"
can i just do this settings in NPM? this is my Reverse Proxy with provides all Certificates in my network
Of course
so something like this? this worked now
rewrite ^/$ /admin/ permanent;
proxy_hide_header X-Frame-Options;
add_header Content-Security-Policy "frame-ancestors 'self' https://mydomain.com";
I'm not Nginx expert but it looks solid
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.