Your original code looked right to me. So, I'm wondering if something
else is preventing it from firing... permissions, installation, wrong
path... something. Can you make it some other trivial task to make
sure its loading? Like
cond %{SEND_RESPONSE_HDR_HOOK}
add-header Foo "bar"(and make sure you see the Foo header -- touch remap.config; traffic_ctl config reload; and then tail your logs to watch for load errors) On Wed, Apr 10, 2019 at 8:55 AM Vasanth Mathivanan <[email protected]> wrote: > > I was tried with SEND_REPONSE could not work .Please give any other solutions > . > > Thanks > __Vasanth > > > > Sent from Mail for Windows 10 > > > > From: Alan Carroll > Sent: Wednesday, April 10, 2019 8:41 PM > To: [email protected] > Subject: Re: Need to remove header in ATS > > > > I'd try SEND_RESPONSE_HDR_HOOK - those headers are likely added adtrer > READ_RESPONSE_HDR_HOOK. > > On Tue, Apr 9, 2019 at 8:54 AM Vasanth Mathivanan > <[email protected]> wrote: >> >> Hi all , >> >> >> >> I have created regex remap for redirect one origin to another origin based >> . But if I post response from curl it throws with lot of headers . So I >> just need to remove location and Cache-Control header from that response .I >> tried with header rewrite plugin but no luck for me , How can I do that ? >> >> >> >> Remap: >> >> >> >> map http://10.137.x.x:8004/ http://192.168.x.x @plugin=regex_remap.so >> @pparam=maps.reg @plugin=header_rewrite.so @pparam=hdr.config >> >> >> >> maps.reg >> >> >> >> ^/new/(.*)$ http://192.168.x.x /$0 @status=302 >> >> >> >> Hdr.config >> >> >> >> cond %{READ_RESPONSE_HDR_HOOK} >> >> rm-header Cache-Control >> >> rm-header Location >> >> rm-header Content-Type >> >> rm-header Pragma >> >> >> >> curl response : >> >> >> >> [root@ceph-admin trafficserver]# curl -I >> 10.137.x.x:8004/new/new2/new3/index.html >> >> HTTP/1.1 302 Redirect >> >> Date: Tue, 09 Apr 2019 13:34:33 GMT >> >> Connection: keep-alive >> >> Via: http/1.1 qa.ivzapp.com (ApacheTrafficServer/6.2.2 [uSc s f p eM:tNc i >> p s ]) >> >> Server: ATS/6.2.2 >> >> Cache-Control: no-store >> >> Location: http://192.168.x.x//new/new2/new3/index.html >> >> Content-Type: text/html >> >> Content-Language: en >> >> Content-Length: 327 >> >> >> >> >> >> Thanks >> __Vasanth >> >> >> >> Sent from Mail for Windows 10 >> >>
