Shiny v1.4 - CSS not downloading behind Nginx

Hi all,

I’ve hit a new & potentially reproducible issue - similar to:

but the workaround isn’t working for me with an image built with shiny v1.4.

My Nginx is in front of Shinyproxy, with a config file something like this:

location / {
         proxy_pass               https://myshinyproxy:8080;
         proxy_ssl_trusted_certificate  /path/to/ca_cert;
         proxy_ssl_certificate          /path/to/cert;
         proxy_ssl_certificate_key      /path/to/key;
         proxy_ssl_session_reuse        off;
         proxy_ssl_protocol             TLSv1.2;

         proxy_redirect                 / $scheme://$http_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;
         proxy_set_header               Host           $http_host;
         proxy_set_header               X-Real-IP          $remote_addr;
         proxy_set_header               X-Forwarded-For    $proxy_add_x_forwarded_for;
         proxy_set_header               X-Forwarded-Proto     $scheme;
}

To reproduce:

Launch either openanalytics/shinyapps-demo or openanalytics/shinyapps-template from prebuilt images (I’m guessing shiny <v1.4?)

The CSS etc loads fine.

Then build the same dockerfiles and use these images instead - CSS, js etc all fail to load for me, despite loading fine on a build that isn’t behind Nginx.

Can anyone else replicate this?

Any suggested workarounds, other than the above, or rolling back to something that does work?

Thanks,

Stuart

After an evening troubleshooting this it’s the same bug - problem starts when shifting from shiny 1.2.0 to 1.3.0, but doesn’t improve with 1.3.1, 1.3.2 or 1.4.0 despite the apparently ‘fixed’ nginx config & mentions of a ‘fix’ (relaxed Connection header interpretation) in 1.3.1 or httpuv 1.5.2.

OK i have an unusal setup running shinyproxy on istio, so I’ll look into ways to replicate the nginx config in istio itself, but I can’t really understand why the ‘fixed’ version wouldn’t work for me while the <v1,3 does, even if istio is enforcing Connection: ‘upgrade’.

Anyway, thought I’d leave an update here for future visitors. I’ll take it to the shiny maintainers.

1 Like