Shinyapps Professional: nginx reverse proxy for subdomain only works with single instance of app

Hi folks,

My organization has an app running in shinyapps.io professional and we've set up a reverse proxy for the subdomain we're using, as shinyapps defaults to http rather than https. It works fine when there's a single instance but when multiple instances are deployed, the reverse proxy on the domain covid-gogn.reykjavik.is loses connection to the server.

The current reverse proxy settings (nginx):

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 8888;
location / {
proxy_pass https://reykjavik.shinyapps.io/covid/;
proxy_redirect https://reykjavik.shinyapps.io/covid/ $scheme://$host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}
}

The reverse proxy runs on Azure.

Many thanks in advance :slight_smile: