Skip to content

Instantly share code, notes, and snippets.

@superchell
Created September 12, 2019 06:18
Show Gist options
  • Save superchell/a0aa8a7a2ca8beb1e129f23683b58230 to your computer and use it in GitHub Desktop.
Save superchell/a0aa8a7a2ca8beb1e129f23683b58230 to your computer and use it in GitHub Desktop.
проверить с помощью curl
curl -v 'https://dev-ehr.h24.ua/cable' -ps://dev-ehr.h24.ua' -H 'Sec-WebSocket-Key: MIN4DsiwEAutsE11kgG5rg==' -H 'Upgrade: websocket' -H 'Connection: Upgrade' -H 'Sec-WebSocket-Version: 13'
location /cable {
proxy_pass http://puma;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme; # <- most probably this one is missing
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on; # this is default, but just to be sure
proxy_buffering off;
proxy_redirect off;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment