Skip to content

Instantly share code, notes, and snippets.

@patsbin
Created May 20, 2021 12:51
Show Gist options
  • Save patsbin/7fb1a218fc40009d11fa7ea514f71e69 to your computer and use it in GitHub Desktop.
Save patsbin/7fb1a218fc40009d11fa7ea514f71e69 to your computer and use it in GitHub Desktop.
location /websocket/ {
rewrite ^/websocket/(.*)$ /$1 break;
proxy_pass $websocket;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment