Add WebSocket support for ActionCable (/cable)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-14 11:39:41 +01:00
parent ab278da5fe
commit 7272017ff8
2 changed files with 28 additions and 0 deletions

View File

@@ -8,6 +8,20 @@ server {
root /var/www/certbot;
}
# WebSocket (ActionCable)
location /cable {
proxy_pass http://dawarich_app:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_send_timeout 86400;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;