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

<application> does not work in iframe #6

Closed
rmountjoy92 opened this issue Feb 24, 2020 · 4 comments
Closed

<application> does not work in iframe #6

rmountjoy92 opened this issue Feb 24, 2020 · 4 comments

Comments

@rmountjoy92
Copy link
Owner

You will notice that DashMachine's iframe option only works with certain apps. Here is the explanation: https://stackoverflow.com/questions/6663244/cant-show-some-websites-in-iframe-tag

If someone finds out a way around this, please let me know or submit a PR.

@rmountjoy92
Copy link
Owner Author

This really needs to be done using the reverse proxy or the application itself.

The X-Frame-Options header needs to exist, and set the value to something like, “ALLOW-FROM http://xxx.xx” in the HTTP response.

If you're using Traefik, you will add a traefik flag - I'm using docker compose, and I have something like this (the last label is important):

labels:
  - "traefik.enable=true"
  - "traefik.http.routers.ouroboros.rule=Host(`ouroboros.example.com`,`ouroboros`)"
  - "traefik.http.middlewares.ouroboros.headers.customrequestheaders.customFrameOptionsValue=ALLOW"

In nginx, I think it's the site (or default) option

proxy_hide_header X-Frame-Options;
People should be aware that this configuration is less secure than the default configurations.

@rmountjoy92 rmountjoy92 added the bug Something isn't working label Feb 24, 2020
@rmountjoy92 rmountjoy92 removed the bug Something isn't working label Mar 8, 2020
@mmarquezs
Copy link

mmarquezs commented May 3, 2020

Just so people are aware, the directive allow-from from the header X-Frame-Options is obsolete.
The new way is using the directive frame-ancestors in the header Content-Security-Policy.
Unless you need to support legacy browsers this is the new way that should be used to allow iframe loading in other domains.

@rmountjoy92
Copy link
Owner Author

@mmarquezs thanks for the info, is there anything I need do on DashMachine's side?

@mmarquezs
Copy link

No, as you said this is something that requires a change on the original application or that can be fixed on the reverse proxy, So unless you add you own reverse proxy to DashMachines there is nothing to do.

I just wanted to add the extra info just in case the other directive doesn't work for some browsers due to being obsolete.

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

No branches or pull requests

2 participants