btw, I'v written a simple remap plugin to do this stuff ( add one header to origin server ). I modify code in "ats/example/add-header" from "global" plugin to "remap" plugin, so you don't need to configure plugin.config.
https://github.com/wkl/add_header (the header "key:value" should not contain space) 2012/2/3 Geoffrey Kneale <[email protected]> > Thanks Leif! > > I have a working config. To note, I also needed to configure the > records.config to NOT force pristine headers. > > In summary: > 1. Configure records.config to not force remap and not force pristine > headers. > 2. Download and install header filter plugin. > 3. Configure plugins to use header filter (global w/o configuration file). > 4. Configure the configuration file for the header filter. > 5. Configure remap to use the header filter with Youtube requests. > > Invaluable tool: > 1. Wireshark with display filter: http.response !=0 || http.request.method > != "TRACE" and check the Hypertext Transfer Protocol section for the header > modifications. > > > > On Wed, Feb 1, 2012 at 7:24 PM, Leif Hedstrom <[email protected]> wrote: > >> On 2/1/12 5:33 PM, Leif Hedstrom wrote: >> >>> On 2/1/12 3:35 PM, Alan M. Carroll wrote: >>> >>>> Wednesday, February 1, 2012, 3:22:11 PM, you wrote: >>>> >>>> --- remap.config --- >>>>> regex_map http://www.youtube.comhttp://**www.youtube.com@plugin=/** >>>>> libexec/trafficserver/header_**filter.so @pparam=/etc/trafficserver/** >>>>> youtube.config >>>>> regex_map http://(.*) http://$1 >>>>> >>>> >>>> >> Two more things while I remember it: >> >> 1) You shouldn't have to type the full path to the plugin, as long as you >> installed it in the normal install directory. I.e. @plugin=header_filter.so >> should work. >> >> 2) This particular plugin is a bit "strange", in that it is both a remap >> plugin, and normal (hooks) plugin. This means for it to function properly, >> you also have to add a line to plugins.config, to make sure all the hooks >> are activated. I don't know if the documentation specifies this or not? >> >> Cheers, >> >> -- Leif >> >> > -- Regards, Conan
