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

oauth2_proxy not work with EventSource #266

Open
ngochai94 opened this issue Jun 14, 2016 · 6 comments
Open

oauth2_proxy not work with EventSource #266

ngochai94 opened this issue Jun 14, 2016 · 6 comments

Comments

@ngochai94
Copy link

ngochai94 commented Jun 14, 2016

Hi, I'm having problem using EventSource.
Everything works fine if the proxy is not present: my client receive the response from server.
However, if the proxy is present, the client doesn't receive anything and keep requesting to the server every 3 seconds. I guess something wrong with the proxy?

@ngochai94
Copy link
Author

It looks like oauth2_proxy cache every responses from my server until it finishes, then those responses will be forwarded to the client. But that's not what a want, a delay for the client, is there any way to tell oauth2_proxy forward every response immediately?

@willejs
Copy link

willejs commented Sep 27, 2016

@ngochai94 I am having the same issue with SSE. @jehiah Any idea how this could be fixed?

@gtaylor
Copy link

gtaylor commented Jun 15, 2017

Did anyone figure out a workaround for this?

@jehiah
Copy link
Member

jehiah commented Jun 15, 2017

@willejs @gtaylor @ngochai94 oauth2_proxy doesn't cache anything.

Please include steps to reproduce the issue you are seeing, and include logs from oauth2_proxy and your upstream that indicate how each is responding to requests.

@ploxiln
Copy link
Contributor

ploxiln commented Jun 15, 2017

I think he means, oauth2_proxy buffers the response until it is complete, but the client wants to get parts of the response as soon as they are available.

I'm still not 100% sure what this is or how it works but it's probably this thing: https://developer.mozilla.org/en-US/docs/Web/API/EventSource

@arins
Copy link

arins commented Sep 19, 2017

for example in nginx you have to do following to make it work
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;

I guess same thing needs to be done i oauth2_proxy

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

No branches or pull requests

6 participants