Jake, you probably want to set pristine_host_hdr in records.config if
I understand you correctly.

CONFIG proxy.config.url_remap.pristine_host_hdr INT 1

You can get at the HTTP headers in a remap plugin (beyond what's
provided from ts/remap.h), but it's a bit of a hack. More
sophisticated plugins should probably be written ground-up as a TS
plugin. See:

http://svn.apache.org/repos/asf/trafficserver/plugins/header_filter/header_filter.cc
especially the tsremap_remap function where a static_cast on the rh
handle happens to be the current txn. At this point, all the TS
methods that operate on a txn handle are available to you:

http://trafficserver.apache.org/docs/v2/sdk/WorkWithHTTPHeaders.html
- and more generally -
http://trafficserver.apache.org/docs/v2/sdk/HTTPHeaders.html

--Eric

On Thu, Feb 17, 2011 at 12:13 PM, Jacob Vorreuter <j...@heroku.com> wrote:
>
> Hi,
>
> Is it possible to pass the origin server host/port to TS as an HTTP header?  
> I want to run TS purely as an HTTP cache behind a load balancer and leave the 
> logic for choosing a backend in the load balancer.
>
> Would a remap plugin work?  Looking at the arguments to the tsremap_remap 
> function, I don't see the HTTP client headers.  Are they not available?
>
> Jake

Reply via email to