Posts

Showing posts with the label nginx-reverse-proxy

How to forward web-socket request to microservice using nginx

Image
Clash Royale CLAN TAG #URR8PPP How to forward web-socket request to microservice using nginx I wanted to forward the web-socket request to microservice using nginx. I am hitting https://some-host/download-zip-service/downloadFile https://some-host/download-zip-service/downloadFile By this, the calls are landing on download-zip-service and downloadFile API get the call. but when I tried to call socket API in download-zip-service I do something like var socket = io('https://some-host/download-zip-service/'); var socket = io('https://some-host/download-zip-service/'); the calls are directly landing on wss://some-host/socket.io/?EIO=3&transport=websocket&sid=12345678 wss://some-host/socket.io/?EIO=3&transport=websocket&sid=12345678 instead of https://some-host/download-zip-service/socket.io/?EIO=3&transport=websocket&sid=12345678 https://some-host/download-zip-service/socket.io/?EIO=3&transport=websocket&sid=12345678 as a reason, I expl...