Last active
October 25, 2021 10:02
-
-
Save carlssonk/32f7d56a92501c5e0b2722f394c9a841 to your computer and use it in GitHub Desktop.
Revisions
-
carlssonk revised this gist
Oct 25, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Minimal viable Nginx Configuration on how a reverse proxy for WebSockets might look like. For WebSocket ``` -
carlssonk created this gist
Oct 25, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # Minimal viable Nginx Configuration on how a reverse proxy for [socket.io](https://socket.io/) might look like. For WebSocket ``` location /websocket/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://localhost:4000; #Change 4000 to whatever port your app runs on. } ``` For Socket.io ``` location /socket.io/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://localhost:4000/socket.io/; #Change 4000 to whatever port your app runs on. } ```