mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
varnish tweaks
This commit is contained in:
@ -60,7 +60,7 @@ sub vcl_recv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# honor cache control headers for "no-cache" or "no-store"
|
# honor cache control headers for "no-cache" or "no-store"
|
||||||
if (req.http.Cache-Control ~ "no-cache" || req.http.Cache-Control ~ "no-store") {
|
if (req.http.Cache-Control ~ "no-cache" || req.http.Cache-Control ~ "no-store" || req.url ~ "\.m3u8$") {
|
||||||
return (pass);
|
return (pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,6 +115,8 @@ sub vcl_backend_response {
|
|||||||
} else {
|
} else {
|
||||||
# default ttl if no cache header
|
# default ttl if no cache header
|
||||||
set beresp.ttl = 1m;
|
set beresp.ttl = 1m;
|
||||||
|
set beresp.uncacheable = true;
|
||||||
|
return (pass);
|
||||||
}
|
}
|
||||||
# grace period for stale content
|
# grace period for stale content
|
||||||
set beresp.grace = 10m;
|
set beresp.grace = 10m;
|
||||||
|
Reference in New Issue
Block a user