# Deepnote- and MeshCat- specific NginX proxy server configuration.
#
# Proxy https://DEEPNOTE_PROJECT_ID:8080/PORT/ to http://127.0.0.1:PORT/ so
# that multiple notebooks can all be served via Deepnote's only open port.
#
# For conf documentation, see https://www.nginx.com/resources/wiki/start/.
server {
  listen 8080 default_server;
  listen [::]:8080 default_server;
  root /var/www/html;
  server_name _;
  location ~ /(7[0-9][0-9][0-9])/(.*) {
    proxy_pass http://127.0.0.1:$1/$2;
  }
  proxy_read_timeout 600;
  proxy_connect_timeout 600;
  proxy_send_timeout 600;
  send_timeout 600;
}
