yum/3ner
A toon shader for Unity's BIRP.
git clone https://git.yummers.dev/yum/3ner
50e4514
master
1server { 2 root /var/www/html; 3 4 # Add index.php to the list if you are using PHP 5 index index.html index.htm index.nginx-debian.html; 6 7 server_name yummers.dev www.yummers.dev; 8 9 # Security headers 10 add_header X-Frame-Options "SAMEORIGIN" always; 11 add_header X-Content-Type-Options "nosniff" always; 12 add_header X-XSS-Protection "1; mode=block" always; 13 add_header Referrer-Policy "strict-origin-when-cross-origin" always; 14 15 location / { 16 # First attempt to serve request as file, then 17 # as directory, then fall back to displaying a 404. 18 try_files $uri $uri/ =404; 19 } 20 21 # Add WebSocket proxy for HR proxy server 22 location /hrproxy { 23 proxy_pass https://127.0.0.1:2096; 24 proxy_http_version 1.1; 25 proxy_set_header Upgrade $http_upgrade; 26 proxy_set_header Connection "upgrade"; 27 include snippets/proxy-headers.conf; 28 proxy_read_timeout 300s; 29 proxy_send_timeout 300s; 30 proxy_buffering off; 31 } 32 33 # OBS Proxy API endpoints 34 location /api/ { 35 limit_req zone=api_limit burst=20 nodelay; 36 37 proxy_pass http://127.0.0.1:5000; 38 include snippets/proxy-headers.conf; 39 } 40 41 # OBS Proxy HLS playlist + segments 42 location /hls/ { 43 limit_req zone=hls_limit burst=200 nodelay; 44 45 alias /var/www/streams/live/; 46 add_header Access-Control-Allow-Origin "*" always; 47 48 # Playlist files (.m3u8) should not be cached - they change constantly 49 location ~ \.m3u8$ { 50 add_header Cache-Control "no-cache, no-store, must-revalidate" always; 51 add_header Access-Control-Allow-Origin "*" always; 52 } 53 54 # Key files must never be cached client-side 55 location ~ \.key$ { 56 add_header Cache-Control "no-cache, no-store, must-revalidate" always; 57 add_header Access-Control-Allow-Origin "*" always; 58 } 59 60 # Segment files (.ts) can be cached - they're immutable 61 location ~ \.ts$ { 62 add_header Cache-Control "public, max-age=30" always; 63 add_header Access-Control-Allow-Origin "*" always; 64 } 65 66 autoindex off; 67 limit_except GET HEAD { 68 deny all; 69 } 70 } 71 72 # Add RTMP callbacks route (internal only) 73 location /rtmp_callbacks/ { 74 allow 127.0.0.1; 75 deny all; 76 77 proxy_pass http://127.0.0.1:5000; 78 include snippets/proxy-headers.conf; 79 } 80 81 listen [::]:443 ssl ipv6only=on; # managed by Certbot 82 listen 443 ssl; # managed by Certbot 83 ssl_certificate /etc/letsencrypt/live/yummers.dev/fullchain.pem; # managed by Certbot 84 ssl_certificate_key /etc/letsencrypt/live/yummers.dev/privkey.pem; # managed by Certbot 85 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 86 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 87} 88 89server { 90 if ($host = www.yummers.dev) { 91 return 301 https://$host$request_uri; 92 } # managed by Certbot 93 94 95 if ($host = yummers.dev) { 96 return 301 https://$host$request_uri; 97 } # managed by Certbot 98 99 100 listen 80; 101 listen [::]:80; 102 103 server_name yummers.dev www.yummers.dev; 104 return 404; # managed by Certbot 105}