diff options
Diffstat (limited to 'etc/nginx/sites-available/yummers.dev')
| -rw-r--r-- | etc/nginx/sites-available/yummers.dev | 15 |
1 files changed, 12 insertions, 3 deletions
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 { |
