Skip to content
Snippets Groups Projects
Commit 2d28d7e2 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Added streaming block in CM vhost (refs #25331).

parent 8c46f29b
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,22 @@ server { ...@@ -45,6 +45,22 @@ server {
proxy_read_timeout 12h; proxy_read_timeout 12h;
} }
location /streaming/ {
# check requested path, only m3u8 and ts are allowed
# ?: means that the group should not be stored as variable
location ~ ^/streaming/([\d\.\:]+)/((?:.+)\.(?:m3u8|ts)(?:\?.+)*)$ {
proxy_pass https://$1/$2;
proxy_cache livecache;
# do not consider secure urls as new files
proxy_cache_key $scheme$proxy_host$uri;
# only one request at a time will be allowed to populate a new cache element
proxy_cache_lock on;
# show if playlist or fragment has been cached from wowza
add_header X-Cache $upstream_cache_status;
# wowza is defining expiration headers (m3u8 is 1s, ts is 3600)
}
}
location / { location / {
uwsgi_pass unix:///home/skyreach/.skyreach/uwsgi.sock; uwsgi_pass unix:///home/skyreach/.skyreach/uwsgi.sock;
include /etc/nginx/uwsgi_params; include /etc/nginx/uwsgi_params;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment