bitly / oauth2_proxy

A reverse proxy that provides authentication with Google, Github or other provider
MIT License
5.1k stars 1.21k forks source link

RequestURI prepend #562

Open rmazlumyan opened 6 years ago

rmazlumyan commented 6 years ago

Would be useful to have a simple rewrite like option to prepend a path to the RequestURI before proxying upstream.

For instance, an incoming request for /index.html can be rewritten to /my-prepend/index.html when sent upstream.

I can submit a PR if there's interest.

cliveza commented 6 years ago

In my case I want put the proxy in front of Kibana, that's host on AWS as part of there Elastic Search Service, so that all request to https://kibana.mydomain.com target the upstream as https://vpc-es-11112222333444111-east-1.es.amazonaws.com/_plugin/kibana/

Its the /_plugin/kibana/ that I want to automatically add if it's not there already, seems like this change will add that.