Skip to content

Commit

Permalink
Edit websocket configuration
Browse files Browse the repository at this point in the history
Add proxy configuration to proxy requests from /ws to a websocket server listening
on port 4321 in the host (172.17.0.1) (https://dev.to/natterstefan/docker-tip-how-to-get-host-s-ip-address-inside-a-docker-container-5anh)
  • Loading branch information
LeaoLuciano committed Oct 9, 2024
1 parent 06c90c4 commit 404d4d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ server {
}

location /ws {
proxy_pass http://127.0.0.1:4321;
proxy_pass http://172.17.0.1:4321;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
include /etc/nginx/shared/proxy.conf;

}


location /metrics {
auth_basic "Metrics";
auth_basic_user_file /etc/nginx/shared/htpasswd;
Expand Down

0 comments on commit 404d4d4

Please sign in to comment.