1
Tutorials and FAQs / How to use haproxy "replace-path" http-request function
« on: November 08, 2023, 04:22:45 pm »
Hello @all,
I'm using haproxy for several backend pools with ssl offload which is working fine when I use domains which go thru rules into these backends.
Now I want to use the well documented feature of "redirecting" paths.
So for example a request to https://test.domain.com/app1" should be redirected to a backend without the path but still preserving the rest of the path.
It can be used by adding a backend rule "http-request replace-path /xxxx(/)?(.*) /\2" where xxxx is the "virtual" directory
This feature ist documented in https://www.haproxy.com/blog/path-based-routing-with-haproxy
Please can anyone give advice how to use that feature in opnsense's haproxy implementation?
I'm using latest version 23.7.6
Thanks @all in advance from Germany...
I'm using haproxy for several backend pools with ssl offload which is working fine when I use domains which go thru rules into these backends.
Now I want to use the well documented feature of "redirecting" paths.
So for example a request to https://test.domain.com/app1" should be redirected to a backend without the path but still preserving the rest of the path.
It can be used by adding a backend rule "http-request replace-path /xxxx(/)?(.*) /\2" where xxxx is the "virtual" directory
This feature ist documented in https://www.haproxy.com/blog/path-based-routing-with-haproxy
Please can anyone give advice how to use that feature in opnsense's haproxy implementation?
I'm using latest version 23.7.6
Thanks @all in advance from Germany...