Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
ddd544cf
Commit
ddd544cf
authored
8 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
math regex even if url has arguments, cache all m3u8 playlists, refs
#18898
parent
4b44c7c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
71.Install_a_cache/default
+12
-5
12 additions, 5 deletions
71.Install_a_cache/default
with
12 additions
and
5 deletions
71.Install_a_cache/default
+
12
−
5
View file @
ddd544cf
...
...
@@ -11,28 +11,32 @@ server {
}
location ~* /crossdomain.xml {
alias /var/www/html/crossdomain.xml;
alias /var/www/html/crossdomain.xml;
}
# cache configuration for live
location ~* /live/.*\.(m3u8)$ {
location ~* /live/.*\.(m3u8)
.*
$ {
proxy_cache [CACHE_NAME];
proxy_pass [CACHE_PROXY_PASS_STREAM]; # http only
# only one request at a time will be allowed to populate a new cache element
proxy_cache_lock on;
proxy_ignore_headers Cache-Control;
proxy_ignore_headers Set-Cookie;
proxy_ignore_headers X-Accel-Expires;
proxy_ignore_headers Expires;
proxy_hide_header Pragma;
expires 1s;
# instruct browser never to cache this
expires -1;
add_header X-Cache $upstream_cache_status;
proxy_cache_use_stale updating;
proxy_cache_min_uses 1;
# how long should the data be kept in the cache
proxy_cache_valid 200 1s;
# do not consider secure urls as new files
proxy_cache_key $scheme$proxy_host$uri;
}
location ~* /live/.*\.(ts)$ {
location ~* /live/.*\.(ts)
.*
$ {
proxy_cache [CACHE_NAME];
proxy_pass [CACHE_PROXY_PASS_STREAM]; # http only
proxy_cache_lock on;
...
...
@@ -41,7 +45,7 @@ server {
proxy_ignore_headers X-Accel-Expires;
proxy_ignore_headers Expires;
proxy_hide_header Pragma;
expires
10
s;
expires
2
s;
add_header X-Cache $upstream_cache_status;
proxy_cache_use_stale updating;
proxy_cache_min_uses 1;
...
...
@@ -61,6 +65,7 @@ server {
proxy_ignore_headers Expires;
proxy_hide_header Pragma;
expires 7d;
proxy_cache_valid 200 7d;
add_header X-Cache $upstream_cache_status;
proxy_cache_use_stale updating;
proxy_cache_min_uses 1;
...
...
@@ -97,6 +102,7 @@ server {
proxy_ignore_headers Expires;
proxy_hide_header Pragma;
expires 7d;
proxy_cache_valid 200 7d;
add_header X-Cache $upstream_cache_status;
proxy_cache_use_stale updating;
proxy_cache_min_uses 1;
...
...
@@ -145,6 +151,7 @@ server {
proxy_ignore_headers Expires;
proxy_hide_header Pragma;
expires 7d;
proxy_cache_valid 200 7d;
add_header X-Cache $upstream_cache_status;
proxy_cache_use_stale updating;
proxy_cache_min_uses 1;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment