Bokeh server and port forwarding problem

Hello,

I’m trying to embed a bokeh server in Flask and deploy it behind nginx.

The machine is only available from our administrative network via port forwarding.

Port 8081 is forwarded to port 80 on the server running nginx.

I tried to reproduce this configuration using docker.

I created a small example available on github: https://github.com/beenje/bokeh_flask_nginx

My problem is that the bokeh script autoload.js tries to load the js files (bokeh.min.js…)

using the wrong port. It uses port 80 instead of 8081.

Is that a bug?

Or is there a specific argument I have to use?

Or something to change in nginx configuration?

The example on github makes it easy to reproduce.

Thanks

Benjamin