Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket doesn't work on production #585

Open
pioter opened this issue Feb 16, 2024 · 0 comments
Open

Websocket doesn't work on production #585

pioter opened this issue Feb 16, 2024 · 0 comments

Comments

@pioter
Copy link

pioter commented Feb 16, 2024

What it's not working?

Nginx as reverse proxy, passenger working with apache

location /cable {
proxy_pass http://127.0.0.1:3024;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}

in console 'WebSocket connection to 'wss://domain.com/cable' failed: '

production.rb
config.action_cable.url = 'wss://[domain.com:3024/cable'
config.web_socket_server_url = "wss://[domain.com:3024/cable"
config.action_cable.mount_path = ":3024/cable"
config.action_cable.allowed_request_origins = ['https://domain.com',
'http://domain.com']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant