Verified Commit 84368c3c authored by Roman Ondráček's avatar Roman Ondráček
Browse files

nginx: fix WebSocket read timeout


Signed-off-by: Roman Ondráček's avatarRoman Ondráček <ondracek.roman@centrum.cz>
parent 85b482d9
upstream backend {
server unix:/run/php/iqrf-gateway-webapp-fpm.sock;
}
server {
listen 80;
listen [::]:80;
......@@ -24,6 +28,7 @@ server {
location /ws {
proxy_pass http://localhost:1338;
proxy_read_timeout 3600;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
......@@ -33,6 +38,7 @@ server {
location /wsMonitor {
proxy_pass http://localhost:1438;
proxy_read_timeout 3600;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
......@@ -57,12 +63,12 @@ server {
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/iqrf-gateway-webapp-fpm.sock;
fastcgi_pass backend;
fastcgi_index index.php;
include fastcgi_params;
}
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: https://repository.iqrfalliance.org; connect-src 'self' ws: wss: https://apidocs.iqrf.org https://repository.iqrfalliance.org https://sentry.iqrf.org; media-src 'none'; object-src 'none'; prefetch-src 'self'; child-src 'none'; frame-src 'none'; worker-src 'none'; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; report-uri https://sentry.iqrf.org/api/2/security/?sentry_key=7cd0252aae6d491b98514b9486cd2771" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: https://repository.iqrfalliance.org; connect-src 'self' ws: wss: https://apidocs.iqrf.org https://repository.iqrfalliance.org https://sentry.iqrf.org; media-src 'none'; object-src 'none'; prefetch-src 'self'; child-src 'none'; frame-src 'none'; worker-src 'none'; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; report-uri https://sentry.iqrf.org/api/2/security/?sentry_key=7cd0252aae6d491b98514b9486cd2771" always;
add_header Referrer-Policy "same-origin" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "deny" always;
......@@ -72,3 +78,4 @@ server {
ssl_certificate /etc/iqrf-gateway-webapp/certs/cert.pem;
ssl_certificate_key /etc/iqrf-gateway-webapp/certs/privkey.pem;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment