trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Strongman <jasonstrongman2...@gmail.com>
Subject parent.config - Child To Parent Requests
Date Thu, 27 Aug 2015 21:01:28 GMT
When the child sends a request to a parent, the request is constructed
using the absolute URL.

GET http://origin.example.com/video.mp4 HTTP/1.1
HOST: media.example.com
....

In this scenario the host in the absolute URL is used at the parent
server to determine what to do with the request. The HOST header is
ignored.
I have tried to change the host value in the URL via a global lua
script and I was unsuccessful. I tried to step in at all the
transaction points, and no luck.
So maybe I am missing something. Any clues as to which transaction
point will allow me to modify the host value in the URL?
Also instead of modifying the GET URL via lua, is there a
configuration option that will force the child-to-parent request to
use a relative path instead?

GET /video.mp4
HOST: media.example.com

The reason for all this, is that I want to keep the remap.config the
same on both child and parent.
I also want to be able to modify the HOST header in flight for
child-to-parent communications.

Below are some important config captures from my ATS 5.1.2 an 5.3.1 builds.





Child Server Configuration Files:

records.config

CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
CONFIG proxy.config.url_remap.pristine_host_hdr INT 1

remap.config

   map http://media.example.com/ http://origin.example.com/

parent.config

   dest_domain=origin.example.com method=get
parent="p1.example.com:80" round_robin=true



Parent Server Configuration File

remap.config

    map http://origin.example.com/ http://origin.example.com/

Mime
View raw message