diff --git a/nginx/nginx-bootstrap.conf b/nginx/nginx-bootstrap.conf index 8060c17..68fda26 100644 --- a/nginx/nginx-bootstrap.conf +++ b/nginx/nginx-bootstrap.conf @@ -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; diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 991a9bc..b48f9a8 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -59,6 +59,20 @@ server { font/otf font/opentype; + # 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 https; + 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;