Created
March 11, 2026 17:22
-
-
Save HoughIO/32928d4a82b6df984b726d2b6b6ae9bd to your computer and use it in GitHub Desktop.
KittyCam nginx config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8080; | |
| server_name _; | |
| root /opt/kittycam/web; | |
| index index.html; | |
| proxy_buffering off; | |
| proxy_request_buffering off; | |
| location = /auth { | |
| if ($arg_key != "7jYVuk7F3cv0djjAQeNqURK8") { return 403; } | |
| return 200; | |
| } | |
| location /stream { | |
| proxy_pass http://127.0.0.1:8081/; | |
| proxy_http_version 1.1; | |
| proxy_set_header Connection ""; | |
| proxy_buffering off; | |
| proxy_cache off; | |
| proxy_read_timeout 3600s; | |
| proxy_send_timeout 3600s; | |
| chunked_transfer_encoding off; | |
| add_header Cache-Control "no-cache, no-store, must-revalidate"; | |
| add_header Pragma "no-cache"; | |
| } | |
| location = /api/events { | |
| alias /opt/kittycam/events.json; | |
| default_type application/json; | |
| add_header Cache-Control "no-cache"; | |
| } | |
| location /api/gacha/ { | |
| proxy_pass http://127.0.0.1:8082; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| add_header Cache-Control "no-cache"; | |
| } | |
| location = /api/log-view { | |
| proxy_pass http://127.0.0.1:8082; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| } | |
| location = /api/views/today { | |
| proxy_pass http://127.0.0.1:8082; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| } | |
| location /clips/ { | |
| alias /opt/kittycam/clips/; | |
| autoindex on; | |
| autoindex_format json; | |
| add_header Cache-Control "no-cache"; | |
| } | |
| location /static/ { | |
| alias /opt/kittycam/web/static/; | |
| add_header Cache-Control "public, max-age=31536000"; | |
| } | |
| location ~* (sw\.js|manifest\.json)$ { | |
| add_header Cache-Control "no-cache, no-store, must-revalidate"; | |
| } | |
| location / { | |
| try_files $uri $uri/ =404; | |
| add_header Cache-Control "no-cache"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment