devops-coop / ansible-haproxy

Installs and configure HAProxy
Apache License 2.0
96 stars 97 forks source link

Add reqrep in the backend template. #95

Closed ghost closed 7 years ago

ghost commented 7 years ago

i suggest to add this reqrep feature to the backend template.

As the official documentation says :

The legacy statements reqrep and reqirep are still usefull for the cases not yet covered by the http-request rules.

My use case is to remove the grafana web context, and no HTTP header fields can be change with a http-request replace-value. So, and it works, I need to add this line to the backend definition:

reqrep ^([^\ ]*\ /)grafana[/]?(.*) \1\2

Sources: https://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#rewrite-anywhere-in-the-request-using-regexes https://en.wikipedia.org/wiki/List_of_HTTP_header_fields

ghost commented 7 years ago

Any news? or comment?

benwebber commented 7 years ago

Sorry for the delay, Olivier. This is perfectly fine.