Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable/allow X-Frame Options (iFrame) #2215

Open
Gh0stExp10it opened this issue Feb 20, 2025 · 4 comments · Fixed by #2236
Open

How to enable/allow X-Frame Options (iFrame) #2215

Gh0stExp10it opened this issue Feb 20, 2025 · 4 comments · Fixed by #2236

Comments

@Gh0stExp10it
Copy link

Versions

  • Pi-hole: 6.0.1
  • AdminLTE: 6.0
  • FTL: 6.0

Platform

  • OS and version: Ubuntu 22.04.5 LTS
  • Platform: Bare-Metal (Ubuntu-Server on a local Server)

Expected behavior

I would like to display the Webinterface of Pi-Hole version 6 in an iFrame (e.g. Home Assistant). In the previous version 5.x with lighttpd it was relatively easy to allow X-Frame-Options.

e.g.:

$HTTP["url"] =~ "^/admin/" {
    setenv.set-response-header = ( "X-Frame-Options" => "ALLOW" )
}

Actual behavior / bug

I don't see any option in the new pihole.toml configuration nor in any documentation to enable this feature.

@yubiuser
Copy link
Member

Pi-hole uses a build in webserver 'civetweb' for which passing arguments like this is not implemented yet. But it is on our todo list.

@yubiuser yubiuser transferred this issue from pi-hole/web Feb 20, 2025
@Gh0stExp10it
Copy link
Author

Thanks for the clarification and your work.

If you don't mind, please leave this issue open for other people to refer to. And as soon as it is implemented in the new webserver, you can close it.

@DL6ER
Copy link
Member

DL6ER commented Feb 21, 2025

#2236

Please try

sudo pihole checkout ftl new/webserver_headers

and you should be able to edit the property webserver.headers in /etc/pihole/pihole.toml to remove the part

X-Frame-Options: DENY\r\n

@DL6ER
Copy link
Member

DL6ER commented Feb 22, 2025

#2236 has just been merged, the code is now in development and will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants