https://rancher.com/ logo
Title
s

stale-dinner-99388

05/27/2022, 12:04 PM
Hello Everyone. I am trying to embed rancher dashboard into html page using
iframe
but i am not able to do B/z of
X-Frame-Options
header is there any way to disable
X-Frame-Options
header
m

mysterious-lock-12214

05/30/2022, 5:30 PM
There is a way to embed it into an iframe: here is a snippet of how we do this exact thing via helm-overrides for nginx-ingress, just replace <topleveldomain> with your embedding domain let me know if this works for you 🙂
deploy-rancher-ui:
    enabled: true
    version: <version>
    rancher_ui_dns: "<dns>"
    letsEncrypt_admin_mail: "<email>"
    ingress:
      configurationSnippet: |
        more_clear_headers 'X-Frame-Options';
        more_set_headers "Content-Security-Policy: frame-ancestors *.<topleveldomain> 'self'";
s

stale-dinner-99388

05/31/2022, 11:58 AM
@mysterious-lock-12214 thanks. Now, rancher dashboard is embed into HTML page but facing error with this line
more_set_headers "Content-Security-Policy: frame-ancestors *.<topleveldomain> 'self'";
@mysterious-lock-12214 Can you please me