> On Jan 12, 2020, at 12: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


Sweet!

Derailing: What happened to the ideas around making some “Cook Book” style 
collections of useful Lua, header_rewrite, and other plugin (transaction box?) 
scripts and configurations ? I think this is probably an area where we can 
really make a difference for people getting started with ATS.

Cheers,

— leif

Reply via email to