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

feat: Use proxy for contacting Flagsmith #134

Closed

Conversation

GuyGitzMagen
Copy link

@GuyGitzMagen GuyGitzMagen commented Dec 12, 2024

This pull request includes changes to the src/edge_proxy module to add a proxy configuration for HTTP clients. The most important changes include modifying the AppSettings class to include a proxy setting and updating the HTTP client initialization to use this proxy setting.

Proxy Configuration Addition:

HTTP Client Initialization:

@dabeeeenster
Copy link
Contributor

This config needs adding to docs if/when it gets merged too.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @GuyGitzMagen , thanks very much for the contribution. This is great. I've added a couple of minor comments, but please let me know if you'd rather we implement the changes in house from this point.

src/edge_proxy/settings.py Outdated Show resolved Hide resolved
@rolodato
Copy link
Member

I've not tested this, but if I'm not mistaken you can just use the ALL_PROXY or HTTP_PROXY+HTTPS_PROXY environment variables for this: https://www.python-httpx.org/environment_variables/

@matthewelwell
Copy link
Contributor

I've not tested this, but if I'm not mistaken you can just use the ALL_PROXY or HTTP_PROXY+HTTPS_PROXY environment variables for this: https://www.python-httpx.org/environment_variables/

Nice, thanks @rolodato. @GuyGitzMagen are you able to test that and confirm that it works for your use case? If so, we'll close this PR and update the documentation on our side.

Co-authored-by: Matthew Elwell <mjelwell89@gmail.com>
@GuyGitzMagen
Copy link
Author

Thanks, it's working!
However, I'm a bit concerned about being tightly coupled to edge-proxy's internal client implementation. Would it make sense to add a test case to ensure this functionality remains supported in future versions?

@rolodato
Copy link
Member

I've created a PR to document this here: Flagsmith/flagsmith#4928

@rolodato
Copy link
Member

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.

5 participants