trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Libbey <mlib...@apache.org>
Subject Re: Configure ATS reverse proxy with live HLS origin returning Cache-Control: no-cache
Date Sun, 03 Dec 2017 17:11:42 GMT
We tend to use the header_rewrite plugin for this in our remap rules.

map http://inbound.example.com \
    http://origin.example.com \
    @plugin=header_rewrite.so @pparam=hr.config


With hr.config containing:

cond %{READ_RESPONSE_HDR_HOOK} [AND]
cond %{STATUS} >199 [AND]
cond %{STATUS} <400
    rm-header Pragma
    rm-header Expires
    set-header Cache-Control "max-age=604800, public"

(so that we only cache the success not the missing objects).

miles

On Sun, Dec 3, 2017 at 8:54 AM, ezko <erez.koler@harmonicinc.com> wrote:
> Hi,
> I am trying to configure ATS reverse proxy with a live HLS origin which
> returns Cache-Control: no-cache on everything.
> By default ATS doesn't cache anything because the origin server objects have
> response headers with Cache-Control: no-cache (this is documented).
>
> The only way i found to get it to work was pinning the objects by adding the
> following to cache.config:
>
> url_regex=<path to origin> ttl-in-cache=10s
>
> i choose 10 seconds because that is the target duration in the HLS playlist
> (#EXT-X-TARGETDURATION)
>
> But this seems like a very manual and verbose method , is there any better
> way to configure live content from an origin that returns no-cache ?
> Thanks.
>
>
>
>
> --
> Sent from: http://apache-traffic-server.24303.n7.nabble.com/

Mime
View raw message