0

I make a simple server send event with nodejs. It run perfectly on localhost. When I upload it to my VPS. The request to subscribe link is pending. I cant get any message from backend. Same issues on Chrome and Safari, no console error . In Chrome this request like image : enter image description here

trquoccuong
  • 2,857
  • 2
  • 20
  • 26

1 Answers1

2

I found this problem. It a nginx problems. Add some config to nginx

location / {
  proxy_pass        http://127.0.0.1:3000;
  proxy_buffering off;
  proxy_cache off;
  proxy_redirect    off;
  proxy_set_header Connection '';
  proxy_http_version 1.1;
  chunked_transfer_encoding off;
  proxy_set_header  Host $host;
  proxy_set_header  X-Real-IP  $remote_addr;
}
trquoccuong
  • 2,857
  • 2
  • 20
  • 26