daemon off; worker_processes 1; pid /run/framebridge-publisher/nginx.pid; error_log stderr warn; events { worker_connections 256; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log off; server_tokens off; sendfile on; keepalive_timeout 30; client_body_temp_path /run/framebridge-publisher/client-body; proxy_temp_path /run/framebridge-publisher/proxy; fastcgi_temp_path /run/framebridge-publisher/fastcgi; uwsgi_temp_path /run/framebridge-publisher/uwsgi; scgi_temp_path /run/framebridge-publisher/scgi; map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 127.0.0.1:8088; listen @GERANAS_LAN_IP@:8088; allow 127.0.0.1; allow @CLOUD_LAN_IP@; deny all; server_name framebridge.betancourt.one; root /run/framebridge-publisher/site; index index.html; autoindex off; client_max_body_size 64m; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy strict-origin-when-cross-origin always; add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; media-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'" always; location = /git { return 308 /git/; } location /git/ { rewrite ^ $request_uri; rewrite ^/git/api/v1/repos/framebridge/framebridge(/.*)?$ /api/v1/repos/gerardo/framebridge$1 break; rewrite ^/git/framebridge/framebridge(\.git)?(/.*)?$ /gerardo/framebridge$1$2 break; rewrite ^/(git($|/))?(.*) /$3 break; proxy_pass http://127.0.0.1:3005$uri; proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_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 120s; proxy_request_buffering off; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy strict-origin-when-cross-origin always; } location = /debian { return 308 /debian/; } location /debian/ { alias /run/framebridge-publisher/debian/; autoindex off; limit_except GET HEAD { deny all; } } location = /downloads { return 308 /downloads/; } location /downloads/ { alias /run/framebridge-publisher/downloads/; autoindex off; limit_except GET HEAD { deny all; } } location / { try_files $uri $uri/ =404; limit_except GET HEAD { deny all; } } } }