haproxy modify request path
- by zcourts
I'm just getting started with HAProxy and I was wondering if its possible to modify the request path for an HTTP request.
One of the backend server uses Dropwizard and its assets bundle see here bundle. In my setup
/xyz serves static assets
/api/xyz serves REST resources
With HAProxy I want requests from api.host.com/xyz to be sent to backend/api/xyz and requests from host.com to be sent to backend/
I've gotten most of that working but I can't figure out how to tell HAProxy to change the path, prepending /api/ to anything from api.host.com
Is this possible or am I going about this the wrong way?