Hello,

Le 17/12/2019 à 08:41, Julien Pivotto a écrit :
> On 17 Dec 06:58, Willy Tarreau wrote:
>> On Tue, Dec 17, 2019 at 06:08:56AM +0100, Willy Tarreau wrote:
>>> But now I'm starting to suspect that most of the problem comes from the
>>> fact that people who used to rely on regex in the past will not as easily
>>> perform their rewrites using set-path as they would using a replace rule
>>> which is very similar to the old set. So probably we'd need to introduce
>>> a "replace-path" action and suggest it in the warning emitted for reqrep.
>>>
>>> I think it is important that we properly address such needs and am
>>> willing to backport anything like this to 2.1 to ease the transition if
>>> that's the best solution.
>> What about this ? It does exactly what's needed for me. It's self-contained
>> enough that we could get it backported to 2.1 and maybe even to 2.0 (though
>> it would require some adaptations to legacy mode there).
>>
>> Willy
> I am in favour of replace-path.

Yes, it will be nice to have it.

For my current setup I tested set-path as suggested by Willy and it
works fine with the following setup :

        acl is_dev_qd hdr(host) -i dev.q.d dev.q.d
        acl is_qd hdr(host) -i q.d qs.d www.q.d www.qs.d
        acl is_ppds path_beg -i /PPDSlide/
        http-request set-path /d3%[path] if is_ppds is_dev_question_direct
        http-request set-path /p3%[path] if is_ppds is_question_direct

While using replace-uri, my mistake was to blindly follow the official
documentation examples.
None of these uses absolute uri form.

-- 
Best regards,
Artur


Reply via email to