RE: Playing video in a Notebook sitting behind a reverse proxy

Hi

I have configured Jupyterhub in a container running in a private network, accessed via an nginx reverse proxy. I am able to to access it using a public URL, however when I tried to play a video in the cell, I got a blocked CORS error, and the video won’t play. If i access jupyterhub via internal IP the video works.

I have already enable CORS in my nginx config file like below

    if ($request_method = 'POST') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
            add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
    }

    if ($request_method = 'GET') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
            add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
    }

What else do i need to configure to enable playback of video?

Thanks