There comes socket connection error of CORS with nginx proxy in Ubuntu whereas Http request is working fine with it.
Here is my Nginx config file. This config works fine with Windows and Mac but not working with Ubuntu.
server
{
listen 7000 default_server;
listen [::]:7000 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://nodes;
}
}
upstream nodes {
# enable sticky session based on IP
ip_hash;
server localhost:3000;
server localhost:3001;
server localhost:3003;
}