WebSocket not working on Server behind reverse proxy

I could solve it! If anyone is having this problem check out this post: How to use Nginx as a Reverse proxy for HTTPS and WSS - Self Signed Certificates and Trusted Certificates
on Step 6 - Configure Support to WebSockets is the key for the NGINX reverse proxy configuration.