WebSocket connection to 'wss://cloud.abc.com/sockjs/858/acao2t6g/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

The cliche is that it feels like a configuration issue

I used MUP to deploy the site and enabled HTTPS using manual SSL.

An error was reported on the production server

WebSocket connection to 'wss://cloud.abc.com/sockjs/858/acao2t6g/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

Then I tried to add configuration using a custom location file
proxy: {
		domains: 'cloud.abc.com',
		nginxLocationConfig:'./location.conf',
		loadBalancing: true,
		ssl: {
			//forceSSL: true,
			crt: './chain.crt',
			key: './key.key',
		},
	},

location.conf

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # allow web sockets
proxy_set_header Connection “upgrade”;
proxy_read_timeout 60s;
proxy_send_timeout 60s;

To no avail

According to this question,
#38775

however, it is possible that I am WSS and he is WS, and if I use HTTP access instead of HTTPS access, this error would not occur.

https://  ==> Error
http:// ==> There is no error

So what’s the problem

@zayco Thank you for providing such a good deployment tool. MUP is one of the important reasons I stick to using Meteor. It is so easy to use

Started TaskList: Configuring App
[182.254.159.58] - Pushing the Startup Script
[182.254.159.58] - Pushing the Startup Script: SUCCESS
[182.254.159.58] - Sending Environment Variables
[182.254.159.58] - Sending Environment Variables: SUCCESS
[140.143.239.250] - Pushing the Startup Script
[140.143.239.250] - Pushing the Startup Script: SUCCESS
[140.143.239.250] - Sending Environment Variables
[140.143.239.250] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[182.254.159.58] - Start Meteor
[182.254.159.58] - Start Meteor: SUCCESS
[182.254.159.58] - Verifying Deployment
[182.254.159.58] - Verifying Deployment: SUCCESS
[140.143.239.250] - Start Meteor
[140.143.239.250] - Start Meteor: SUCCESS
[140.143.239.250] - Verifying Deployment
[140.143.239.250] - Verifying Deployment: SUCCESS

Started TaskList: Configure Proxy for Service
[182.254.159.58] - Configure Proxy
[182.254.159.58] - Configure Proxy: SUCCESS
[140.143.239.250] - Configure Proxy
[140.143.239.250] - Configure Proxy: SUCCESS

Every deployment, these green successes, returning information, are so pleasant

No, ws is also wrong, does anyone know

It is strange that no one has encountered this problem. What have I done to cause this problem