Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable progressive proxy via flag #512

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jwindgassen
Copy link

@jwindgassen jwindgassen commented Nov 25, 2024

With the current implementation for progressive proxies from #479, we only make the request progressive if the Accept Header of the request is exactly text/event-stream. We would like to use this feature with other proxies, where the Mime-Type is not so directly determinable, like with xpra (Remote Destop).
As far as I can tell, there is no particular reason to limit the progressive feature to only this use case (see #502).

I changed the code to instead allow configuring the behavior of the proxy via the entrypoint of a proxy. The dictionary returned by the entry point can now contain a value "progressive". When set to either True or False, we can explicitly enable or disable the progressive proxying. When left empty, we will automatically determine what type of proxy to use (see the progressive property).
It can also be a function, when the developer wants to dynamically switch between progressive and buffered proxying.

@jhgoebbert
Copy link

Great. This might also fix the issue described in #494

@jwindgassen jwindgassen force-pushed the progressive-flag branch 2 times, most recently from 9a05e12 to b56a548 Compare December 10, 2024 14:23
@jwindgassen jwindgassen marked this pull request as draft December 14, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants