Shiny Server with Nginx Reverse Proxy + MOD WAF

Hello,
I'm using Nginx as reverse proxy and enabled MOD WAF. We have shiny application which are hosted on Shiny Server Pro. We are seeing issues with MOD enabled for Webscoket request, as below
"WebSocket is closed before the connection is established" i.e webscoket request are getting closed immediately.

If we remove MOD WAF from nginx configuration and try again then it works, so I would like to understand can we use MOD WAF or any other WAF with nginx reverse proxy to serve shiny application.

FYI,

  1. I know MOD doesn't support websocket so we are using MOD only for monitoring http request and its able to monitor and filter out http request.
  2. At nginx we have below configuration to support http and websocket which works without MOD WAF

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
.
.
.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.