Skip to content

Instantly share code, notes, and snippets.

View alexgalkin's full-sized avatar

Alex Halkin alexgalkin

View GitHub Profile
@alexgalkin
alexgalkin / nginx_proxy_socket
Created May 14, 2024 20:41
Reverse proxy configuration for SocketIO server
location /ws/ {
proxy_pass http://localhost:9000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;