You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Petru Ghita <pe...@gmail.com> on 2013/08/12 04:07:47 UTC

remap DELETE method

Hello,

I need to remap a DELETE method to an origin server.
Looking into remap.config I figured I should use something like:

map http://mydomain.com http://10.0.18.101:8090 @action=allow
@method=DELETE @src_ip=0.0.0.0-255.255.255.255

Unfortunately it does not work.

Is this possible with traffic server?
How do you make it work?

Thank you,
Petru Ghita


Re: remap DELETE method

Posted by Leif Hedstrom <zw...@apache.org>.
On Aug 11, 2013, at 9:28 PM, Petru Ghita <pe...@gmail.com> wrote:

> After some digging into the records.conf the problem was that
> 
> CONFIG proxy.config.http.quick_filter.mask INT 1154
> 
> changing it to
> 
> CONFIG proxy.config.http.quick_filter.mask INT 1152

Cool. Note that this doesn't apply with v3.3.x and later, this logic is moved into ip_allow.config.

-- Leif


Re: remap DELETE method

Posted by Petru Ghita <pe...@gmail.com>.
After some digging into the records.conf the problem was that

CONFIG proxy.config.http.quick_filter.mask INT 1154

changing it to

CONFIG proxy.config.http.quick_filter.mask INT 1152

Solved the problem.

On 08/12/2013 04:11 AM, Leif Hedstrom wrote:
> On Aug 11, 2013, at 8:07 PM, Petru Ghita <pe...@gmail.com> wrote:
> 
>> Hello,
>>
>> I need to remap a DELETE method to an origin server.
>> Looking into remap.config I figured I should use something like:
>>
>> map http://mydomain.com http://10.0.18.101:8090 @action=allow
>> @method=DELETE @src_ip=0.0.0.0-255.255.255.255
> 
> Is the expectation that you want to map DELETE to a different origin than the GET ? If so, that's not possible using the remap.config (you'd have to write a plugin in C/C++ or Lua).
> 
> What the src_ip and method directives specifies are ACLs, i.e. allow DELETE from the IP range.
> 
> -- Leif
> 


Re: remap DELETE method

Posted by Petru Ghita <pe...@gmail.com>.
No, it's a lot simpler.

I have a Confluence instance behind a traffic server, and it needs to
invoke a DELETE method to delete a label in this case. So I get the
following message in the squid.log:

1376273947.688 0 x.x.x.x ERR_PROXY_DENIED/403 488 DELETE
http://10.0.18.101:8090/rest/ui/1.0/content/5406906/label/6356993 -
DIRECT/- text/html -

Of course the GET methods work perfectly and they are targeted to the
same internal IP as the DELETE methods.

My remap.config had this particular mapping as:

map http://mydomain.com http://10.0.18.101:8090

so after reading into that file documentation I tried to modify it as:

#map http://mydomain.com http://10.0.18.101:8090 @action=allow
@method=DELETE @src_ip=0.0.0.0-255.255.255.255

Hoping that it'd solve the issue, but it does not.

Thank you,
Petru Ghita

On 08/12/2013 04:11 AM, Leif Hedstrom wrote:
> On Aug 11, 2013, at 8:07 PM, Petru Ghita <pe...@gmail.com> wrote:
> 
>> Hello,
>>
>> I need to remap a DELETE method to an origin server.
>> Looking into remap.config I figured I should use something like:
>>
>> map http://mydomain.com http://10.0.18.101:8090 @action=allow
>> @method=DELETE @src_ip=0.0.0.0-255.255.255.255
> 
> Is the expectation that you want to map DELETE to a different origin than the GET ? If so, that's not possible using the remap.config (you'd have to write a plugin in C/C++ or Lua).
> 
> What the src_ip and method directives specifies are ACLs, i.e. allow DELETE from the IP range.
> 
> -- Leif
> 






Re: remap DELETE method

Posted by Petru Ghita <pe...@gmail.com>.
No, it's a lot simpler.

I have a Confluence instance behind a traffic server, and it needs to
invoke a DELETE method to delete a label in this case. So I get the
following message in the squid.log:

1376273947.688 0 x.x.x.x ERR_PROXY_DENIED/403 488 DELETE
http://10.0.18.101:8090/rest/ui/1.0/content/5406906/label/6356993 -
DIRECT/- text/html -

Of course the GET methods work perfectly and they are targeted to the
same internal IP as the DELETE methods.

My remap.config had this particular mapping as:

map http://mydomain.com http://10.0.18.101:8090

so after reading into that file documentation I tried to modify it as:

#map http://mydomain.com http://10.0.18.101:8090 @action=allow
@method=DELETE @src_ip=0.0.0.0-255.255.255.255

Hoping that it'd solve the issue, but it does not.

Thank you,
Petru Ghita

On 08/12/2013 04:11 AM, Leif Hedstrom wrote:
> On Aug 11, 2013, at 8:07 PM, Petru Ghita <pe...@gmail.com> wrote:
> 
>> Hello,
>>
>> I need to remap a DELETE method to an origin server.
>> Looking into remap.config I figured I should use something like:
>>
>> map http://mydomain.com http://10.0.18.101:8090 @action=allow
>> @method=DELETE @src_ip=0.0.0.0-255.255.255.255
> 
> Is the expectation that you want to map DELETE to a different origin than the GET ? If so, that's not possible using the remap.config (you'd have to write a plugin in C/C++ or Lua).
> 
> What the src_ip and method directives specifies are ACLs, i.e. allow DELETE from the IP range.
> 
> -- Leif
> 


Re: remap DELETE method

Posted by Leif Hedstrom <zw...@apache.org>.
On Aug 11, 2013, at 8:07 PM, Petru Ghita <pe...@gmail.com> wrote:

> Hello,
> 
> I need to remap a DELETE method to an origin server.
> Looking into remap.config I figured I should use something like:
> 
> map http://mydomain.com http://10.0.18.101:8090 @action=allow
> @method=DELETE @src_ip=0.0.0.0-255.255.255.255

Is the expectation that you want to map DELETE to a different origin than the GET ? If so, that's not possible using the remap.config (you'd have to write a plugin in C/C++ or Lua).

What the src_ip and method directives specifies are ACLs, i.e. allow DELETE from the IP range.

-- Leif