Embedding JupyterHub in IFrame

Hi,
I’m trying to embed z2jh in an iframe and I get this error:
Refused to display ‘https://mysite.com/hub/login’ in a frame because an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘self’”.

How can I set this?
I see a similar issue but I don’t know how to convert that to z2jh settings.

z2jh let’s you pass arbitrary extra config to the hub:
https://zero-to-jupyterhub.readthedocs.io/en/latest/advanced.html#arbitrary-extra-code-and-configuration-in-jupyterhub-config-py
This should let you apply the config from the linked issue.

1 Like