As an administrator I would like IG to support basic path rewriting in order to allow applications behind IG to be exposed with a different path.
This covers the use-case where the request URI path should be rewritten before sending the request to the proxied application.
This can be a complex problem to solve when looking at being able to change any aspect of the URIs path so this improvement only covers the simple case of changing the initial part of the URIs path, analogous to the context of a Java web application.
For example, changing the path /frompath to the path /topath
The proxied application may issue a location header in the response and this is likely to contain the /topath in its URI so additional processing maybe required to rewrite the URI before returning the response.
- Add UriRewritingFilter that would contains a list of mapping rules
- Location, Content-Location and URI response headers are to be rewritten
- Need to support just a basic path prefix mapping (can cover multiple path elements)
- / is transformed to /wordpress on the request flow, the reverse transformation applied to selected response headers
- /openam is transformed to /am or just /
- Response transformation need to be done only for Ig's host:port (not transforming redirects to anotherapp.acme.com)
- Protoype configuration as a decorator
Summary of corresponding Zendesk tickets: https://docs.google.com/document/d/1stFSN-AAon4Uv7VQpTjn2kkW2OtkniGCaDZKD7hoBBY/edit#