diff --git a/odoo_install.sh b/odoo_install.sh index bc1fdf3..8d37846 100755 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -404,6 +404,18 @@ server { add_header Cache-Control "public, no-transform"; } + # WebSocket support + location /websocket { + proxy_pass http://127.0.0.1:$OE_PORT; + 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-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + # cache some static data in memory for 60mins. location ~ /[a-zA-Z0-9_-]*/static/ { proxy_cache_valid 200 302 60m; diff --git a/odoo_install_debian.sh b/odoo_install_debian.sh index 425ad77..905d797 100644 --- a/odoo_install_debian.sh +++ b/odoo_install_debian.sh @@ -323,6 +323,19 @@ if [ $INSTALL_NGINX = "True" ]; then proxy_pass http://127.0.0.1:$OE_PORT; add_header Cache-Control "public, no-transform"; } + + # WebSocket support + location /websocket { + proxy_pass http://127.0.0.1:$OE_PORT; + 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-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + # cache some static data in memory for 60mins. location ~ /[a-zA-Z0-9_-]*/static/ { proxy_cache_valid 200 302 60m;