summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-15 16:53:20 -0700
committeryum <yum.food.vr@gmail.com>2025-10-28 17:19:38 -0700
commitbecdbeeefac4fbf4b75ff5052502945f5843ddfb (patch)
tree56f049839b8fc13913182564fc6c634f6b3fba8e /etc
parent2554882f5a4b7d75e6a1dc6dbc29bb94f4c4d06b (diff)
update config to work thru cdn
Diffstat (limited to 'etc')
-rw-r--r--etc/nginx/nginx.conf1
-rw-r--r--etc/nginx/sites-available/yummers.dev15
2 files changed, 12 insertions, 4 deletions
diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf
index 763c968..ab7aff4 100644
--- a/etc/nginx/nginx.conf
+++ b/etc/nginx/nginx.conf
@@ -6,7 +6,6 @@ include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
- # multi_accept on;
}
http {
diff --git a/etc/nginx/sites-available/yummers.dev b/etc/nginx/sites-available/yummers.dev
index bb5bbc5..c1162a6 100644
--- a/etc/nginx/sites-available/yummers.dev
+++ b/etc/nginx/sites-available/yummers.dev
@@ -43,10 +43,19 @@ server {
limit_req zone=hls_limit burst=200 nodelay;
alias /var/www/streams/live/;
-
- add_header Cache-Control "no-cache" always;
add_header Access-Control-Allow-Origin "*" always;
- expires -1;
+
+ # Playlist files (.m3u8) should not be cached - they change constantly
+ location ~ \.m3u8$ {
+ add_header Cache-Control "no-cache, no-store, must-revalidate" always;
+ add_header Access-Control-Allow-Origin "*" always;
+ }
+
+ # Segment files (.ts) can be cached - they're immutable
+ location ~ \.ts$ {
+ add_header Cache-Control "public, max-age=30" always;
+ add_header Access-Control-Allow-Origin "*" always;
+ }
autoindex off;
limit_except GET HEAD {