'invalid frame header' error

‘invalid frame header’ error

I use iframe to embed a jupyterhub and use jupyterlab as the default editor. But I can’t forward my command to terminal through websocket request. Has anyone ever encountered such a problem?

The URL request in question is: 'websocket : /user/xx/terminals/websocket/1?token=xxx ’

About configuration:

Jupyterhub is installed with helm. Some configuration files are as follows:


configuration about hub:
    hub: |
      c.JupyterHub.tornado_settings = { 'headers': { 'Content-Security-Policy': "frame-ancestors * self http://localhost:3000"}}
    spawner: |
      c.Spawner.args = ["--NotebookApp.tornado_settings={'headers':{'Content-Security-Policy': 'frame-ancestors * slef http://localhost:3000'}}"]
    jupyterlab: |
      c.Spawner.cmd = ['jupyter-labhub']

The following is my request forwarding process. I don’t think there is a problem in nginx or FRP forwarding process, because it can be used normally when it is not in iframe

The front end uses’ HTTP proxy middleware 'for forwarding

If someone has encountered similar problems, please don’t hesitate to let me know,Thanks♪(・ω・)ノ

Has anyone ever encountered such a problem?