Commit 85695227 authored by hark's avatar hark

la

parent 5c799848
Pipeline #1220 canceled with stage
......@@ -69,8 +69,18 @@ http {
expires max;
add_header Cache-Control: public;
add_header Cache-Control: immutable;
}
map $request_uri $expires {
default 1m;
~*(.+\.ts)$ 1d;
~*(.+\.m3u8)$ 4;
}
map $request_uri $control {
default "public , s-maxage = 1m, max-age = 1m";
~*(.+\.ts)$ "public , immutable , s-maxage = 1d, max-age = 1m";
~*(.+\.m3u8)$ "public, s-maxage = 4, max-age = 4";
#~*wordpress_logged_in "private, no-cache, no-store";
}
#rewrite ^/$ http://${SD_HOST_HLS_CACHE}/player redirect;
......@@ -81,27 +91,20 @@ http {
}
location /hls {
location ~* (/live|/hls) {
autoindex on;
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
add_header Cache-Control $control;
add_header Expires $expires;
alias /opt/data/hls;
add_header Access-Control-Allow-Origin *;
}
location /live {
autoindex on;
alias /opt/data/hls;
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
add_header Access-Control-Allow-Origin *;
}
location /stat {
rtmp_stat all;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment