diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2b13cfb..3cf4145 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -17,7 +17,7 @@ rtmp { hls_path /tmp/hls; # Path to store HLS files (use an absolute path) hls_nested on; hls_fragment 5s; # Duration of each HLS segment - hls_playlist_length 30s; # Length of HLS playlist (total duration) + hls_playlist_length 15s; # Length of HLS playlist (total duration) } } } @@ -32,11 +32,13 @@ http { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } + add_header Access-Control-Allow-Origin *; - root /tmp/hls; + root /tmp/; + autoindex on; } - location / { + location /api/ { proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose } }