On 9/5/17 8:26am, Holger Just wrote:
> With a modern HAProxy (i.e. anything >= 1.6), you can just use
> 
> http-request set-path %[path,regsub(^/static,/)]

Brilliant, thanks. I spent 20 minutes trying to figure how to submit a patch 
for the documentation, but failed completely. Maintainers of this project: 
please consider making it easier to submit documentation fixes. I know it can 
involve more work engaging with a community, but the rewards can be useful. 
With a task tracker, pull requests, etc its a little hard for a casual user to 
help.

The things that need improvement in the docs are:

1. In the documentation for reqrep make a big note that the examples provided 
are not the current recommended approach and to instead use http-request if 
possible. Otherwise the official documentation reads like it is best practice.

2. In the docs for reqrep, put in an example of what the regex is matching. For 
example "GET /some/path?param=true HTTP/1.1"

3. In the docs for http-request [1] separate out the possible parameters on new 
lines. I read that doc 10 times and never noticed I needed to read across 
because someone wanted to save paper when the docs were printed by wrapping the 
parameters. So I never saw set-path.

4. In the cbonte html version, it would be lovely if set-path was a searchable 
keyword. "path" is and that's just an acl parameter.


Thanks for your help and to everyone working on this project.

Cheers
Ari


[1] https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#http-request


-- 
-------------------------->
Aristedes Maniatis
CEO, ish
https://www.ish.com.au
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to