Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

OAuth 2 proxy redirects POST request which have // in path #179

Open
pawanrawal opened this issue Dec 10, 2015 · 7 comments
Open

OAuth 2 proxy redirects POST request which have // in path #179

pawanrawal opened this issue Dec 10, 2015 · 7 comments

Comments

@pawanrawal
Copy link

I have OAuth 2 proxy which has Grafana as an upstream.

Grafana web makes a POST call to a url like this localhost:4180/api/datasources/proxy/2//_msearch?search_type=count . Since the path has a // before _msearch, oauth2_proxy immediately returns a 301 and sends a GET request to the same url which fails my request. Any reason why this might be happening ?

@jehiah
Copy link
Member

jehiah commented Dec 17, 2015

@pawanrawal hmm... This certainly sounds like path normalization, but i'm not sure where that would be happening. Can you share some logs that might show this happening?

@sjoerdmulder
Copy link
Contributor

sjoerdmulder commented Apr 20, 2016

I'm also experiencing this issue. Somehow double slashes causes redirects instead of just proxying to upstream

BTW found this that might be related https://groups.google.com/forum/#!topic/golang-nuts/zWPOOJjCgNQ

@tekmaven
Copy link

This is a problem. The proxy should not "normalize" urls.

The POST request gets 301 redirected and then a GET request is issued with no payload. This breaks Grafana and potentially other apps where there is "improper" urls generated with double slashes.

@tekmaven
Copy link

The good news is, Grafana has fixed this problem for the next release.

grafana/grafana#5536

@kholloway
Copy link

This affects anyone using Oauth2_proxy in front of Mesos/Marathon also.. :(

d2iq-archive/marathon#3966

@troxor
Copy link

troxor commented Jan 26, 2017

RabbitMQ Management plugin is also affected :( :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

7 participants