I'm trying to deploy that project on a self-hosted server with self-signed SSL.
Using NGINX reverse proxy for HTTP->HTTPS redirection.
The server works partially, for example, the channel cannot connect to the "Event stream".
What is wrong with our NGINX settings?!
While debugging the server I found that defineGetter
returns HTTP protocol despite the fact that we run behind a reverse proxy:
I added the enviroment variable before running the npm start
:
export NODE_TLS_REJECT_UNAUTHORIZED=0
See our NGINX settings:
server {
listen 443 ssl;
server_name servername;
ssl_certificate /tmp/ssl_key/crt/servername.crt;
ssl_certificate_key /tmp/ssl_key/crt/servername.rsa;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
#...
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_redirect http:// https://;
}
}