Re: How can I change the URI when forwarding to a server

2017-01-13 Thread Jürgen Haas
> You’re looking for http-request with set-uri or set-path +
> set-query: 
> https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#4..2-http-request
> 
> 
> -Bryan

This is exactly what I was looking for, thanks a lot.

Jürgen




Re: How can I change the URI when forwarding to a server

2017-01-12 Thread Bryan Talbot

> On Jan 12, 2017, at Jan 12, 5:26 AM, Jürgen Haas  
> wrote:
> 
> Hi all,
> 
> I wonder if I can change the uri that the server receives without doing
> a redirect.


You’re looking for http-request with set-uri or set-path + set-query: 
https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#4.2-http-request 


-Bryan



> 
> Example:
> Request from client: https://www.example.com/login/username?p1=something
> Request received by server: /login.php?s=username&p1=something
> 
> More general:
> - if path begins with /login/*[?*]
> - add the first * as a query parameter s to the query
> - keep other optional query parameters in place
> 
> Is anything like that possible?
> 
> 
> Thanks
> Jürgen
>