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

Can't override X-Frame-Options header #2362

Open
dawidkulpa opened this issue Mar 9, 2025 · 1 comment
Open

Can't override X-Frame-Options header #2362

dawidkulpa opened this issue Mar 9, 2025 · 1 comment

Comments

@dawidkulpa
Copy link

Versions

  • Pi-hole: v6.0.5
  • AdminLTE: v6.0.2
  • FTL: v6.0.4

Platform

  • OS and version: Debian Bullseye
  • Platform: Orange Pi Zero 2W

Expected behavior

After setting X-Frame-Options header in Settings -> All settings -> Webserver -> webserver.headers, requests should be getting the desired value in responses.

Actual behavior / bug

Whatever value I set it to, I always receive x-frame-options: SAMEORIGIN in responses.

Additional context

Setting other headers seem to be working - I tried clearing everything else and leaving only frame options, and in fact the other headers were removed.

@yubiuser yubiuser transferred this issue from pi-hole/web Mar 9, 2025
@DL6ER
Copy link
Member

DL6ER commented Mar 10, 2025

Where are you looking?

It seems to work as expected for me:

Default setting

curl -sI http://pi.hole/admin/login | grep Frame
X-Frame-Options: DENY

After changing it to something else in pihole.toml, this works as well:

curl -sI http://pi.hole/admin/login | grep Frame
X-Frame-Options: ALLOW-FROM abc.com

What seems suspicious to me is that you are quoting the header key all lowercase, however, FTL sends them like in my two examples. Can it be that you have some reverse proxy (or similar) in between which is messing with the headers?

@DL6ER DL6ER added Bug:Discourse Bug reported on Discourse forum No bug Unclear and removed Bug:Discourse Bug reported on Discourse forum labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants