Hey!I'm about to deploy my app to production and I just set up an Nginx proxy in front of my nodejs api.Nginx acts as a reverse proxy forwarding everything under domain.com/api/ to the nodejs app.domain.com leads to my static frontend assets.This setup is causing problems with SocketIO, the client does not receive the messages anymore. Has the namespace or something changed because the api is in a subdirectory?First, the client could not even connect, then I added added the path-property to SocketIO, which I set to '/api'. After that, the client could connect, but not receive any messages.When I have the api on it's own subdomain it works, but not when I do /api. Doing io('domain.com/api') doesn't work, while io('api.domain.com') does. (Both are behind Nginx)Has anyone had problems like this with socketio and can point me in the right direction?Thanks in advance, Trudvang
Submitted July 02, 2018 at 08:59PM by trudvang
No comments:
Post a Comment