Shouldn't your `curl` use `--proxy` to talk to ATS instead of the upstream?

On Wed, Apr 10, 2019 at 10: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 <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Alan Carroll <[email protected]>
> *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://10.137.x.x:8004/>
>> http://192.168.x.x <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 <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 <http://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
>> <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 <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>

Reply via email to