0

I need a reverse proxy which makes server mapping according to some value in cookie.

For example, if there is a variable "key" and it is equal to 2 (key=2) then request must be redirected to server 100.100.100.100.

Can apache traffic server do that?

P.S. I wrote this message to users mailing list of apache server traffic and this is the answer I get:

This is an automatically generated message.

danielxu@yahoo-inc.com is no longer with Yahoo! Inc.

Your message will not be forwarded.

If you have a sales inquiry, please email yahoosales@yahoo-inc.com and someone will follow up with you shortly.

If you require assistance with a legal matter, please send a message to legal-notices@yahoo-inc.com

Thank you!

Pavel_K
  • 10,748
  • 13
  • 73
  • 186

1 Answers1

0

You'd use the header rewrite plugin. In remap.config you'd have a rule like:

map http://example.com http://origin.example.com @plugin=header_rewrite.so @pparam=hdrs.config

and in hdrs.config I think this would work

cond %{COOKIE:key} ="2"
  set-destination HOST 100.100.100.100
Miles Libbey
  • 1,583
  • 2
  • 10
  • 10