You will also have to update your hosting.config to match the volume
where the 'dynamically' set client HOST header should reside.

On Sun, Jan 12, 2020 at 1:16 PM Jeremy Payne <[email protected]> wrote:
>
> pulled the below lua from my work notes..
>
> ++
> function send_request()
>     ts.server_request.header['Host'] = "real-origin.fqdn.com"
> end
>
> function do_remap()
>
> -- this is what i use to segment various file types to different volumes
> -- but will work to separate volumes using the same remap fqdns but
> different paths
> -- enabling pristine is required
>
>     ts.http.config_int_set(TS_LUA_CONFIG_URL_REMAP_PRISTINE_HOST_HDR, 1)
>     ts.client_request.header['Host'] = "live.fqdn.com"
>
> -- restore origin HOST header
>
>     ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
>     return 0
>
>
> end
>
> On Sun, Jan 12, 2020 at 12:52 PM Leif Hedstrom <[email protected]> wrote:
> >
> >
> >
> > On Jan 12, 2020, at 10:47, Jeremy Payne <[email protected]> wrote:
> >
> > 
> > Probably the easiest solution is to create another origin fqdn for your 
> > live or vod content.
> > Then have the corresponding remap use that new fqdn as your origin fqdn
> > If you cant do that then there are some tricks you can play with the origin
> >
> >
> > Yes. This is the best solution IMO, and if the origin can’t handle the new 
> > Host, you could add a header_rewrite rule on the outbound request to 
> > restore the Host as they need it.
> >
> > Kind of feels that we ought to add hosting APIs, maybe in addition/together 
> > with the new parent policy stuff. Vijay and Rushford, what do you think ?
> >
> > Cheers,
> >
> > parameters that determine which volume to use. I'm not at my desk right 
> > now, so when I return I'll look.
> > And as always, there may be some new plugins or new core functionality that 
> > I am not aware of that support this without the DNS or origin trickery.
> >
> > On Sun, Jan 12, 2020, 10:57 AM ezko <[email protected]> wrote:
> >>
> >> Hi,
> >> we are using ATS 8.0.5
> >> we have an origin which serves both live and VOD (different paths) , and
> >> would like to cache live on block RAM disk and VOD on SSD
> >>
> >> example origin urls:
> >> http://origin.mydomain.com/live
> >> http://origin.mydomain.com/vod
> >>
> >> from the DOCS it doesn't seem like there is support for specifying paths in
> >> hosting.config
> >> so the following will not work right ?
> >>
> >> hostname=origin.mydomain.com/live volume=1
> >> hostname=origin.mydomain.com/vod volume=2
> >>
> >> is there another way (maybe using a plugin) ?
> >>
> >> BR,
> >> erez
> >>
> >>
> >>
> >>
> >> --
> >> Sent from: http://apache-traffic-server.24303.n7.nabble.com/

Reply via email to