-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
This config needs adding to docs if/when it gets merged too. |
There was a problem hiding this 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.
I've not tested this, but if I'm not mistaken you can just use the |
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>
Thanks, it's working! |
I've created a PR to document this here: Flagsmith/flagsmith#4928 |
This is now documented here: https://docs.flagsmith.com/deployment/hosting/locally-edge-proxy#environment-variables |
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 theAppSettings
class to include a proxy setting and updating the HTTP client initialization to use this proxy setting.Proxy Configuration Addition:
src/edge_proxy/settings.py
: Added an optionalproxy
attribute to theAppSettings
class.HTTP Client Initialization:
src/edge_proxy/environments.py
: Updated thehttpx.AsyncClient
initialization to include theproxy
setting.src/edge_proxy/server.py
: Modified thehttpx.AsyncClient
initialization to use theproxy
setting fromAppSettings
.