PATCH: Adjusted NGINX config to make m3u8 and png files uncacheable

This commit is contained in:
2025-03-02 16:24:06 +00:00
parent e3e6a3f3dc
commit 091dc5b835

View File

@@ -77,9 +77,16 @@ http {
proxy_set_header Host $host; proxy_set_header Host $host;
} }
## The HLS stream location with thumbnails ## Non cacheable HLS files, m3u8 and png
## Contains TS files, M3U8 files and PNG thumbnails location ~ ^/stream/(.+)/(.+\.(m3u8|png))$ {
location ~ ^/stream/(.+)/(.+\.(ts|m3u8|png))$ { alias /user_data/$1/stream/$2;
# Let the MPEG-TS video chunks be cacheable
expires -1d;
}
## Cacheable HLS files, ts
location ~ ^/stream/(.+)/(.+\.ts)$ {
alias /user_data/$1/stream/$2; alias /user_data/$1/stream/$2;
# Let the MPEG-TS video chunks be cacheable # Let the MPEG-TS video chunks be cacheable