wss://my.domain.com/sockjs/362/4q059yw7/websocket

前端 未结 1 516
旧时难觅i
旧时难觅i 2021-01-28 01:21

I need help in fixing this issue.

I am trying to implement ssl to the domain my.domain.com

Front end is Angular and Backend is Meteor

I was able to crea

1条回答
  •  孤城傲影
    2021-01-28 02:07

    I figured out the issue I had. Issue was in below line in nginx.

     proxy_pass http://localhost:3000;
    

    I fixed it by redirecting it to http://localhost:3000/websocket; and location as location /websocket

    Snippet is below.

    location /websocket {
       proxy_pass http://localhost:3000/websocket;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade; # allow websockets
       proxy_set_header Connection $connection_upgrade;
       proxy_set_header X-Forwarded-For $remote_addr;
    }
    

    0 讨论(0)
提交回复
热议问题