Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,32 @@ http {
root /tmp;
add_header Cache-Control no-cache;
}
location /liquidsoap {
# Serve HLS fragments

# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';

# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}


types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
# this should be mounted as volume with docker image
root /tmp/liquidsoap;
add_header Cache-Control no-cache;
}

}
}

Expand Down