Skip to content

Conversation

@GuyGitzMagen
Copy link
Contributor

Problem

The httpx client was not configured to follow redirects, which caused issues when the Flagsmith API returned 307 Temporary Redirect responses.

Solution

Added follow_redirects=True to the httpx.AsyncClient configuration in src/edge_proxy/server.py.

Changes

  • Modified src/edge_proxy/server.py to enable redirect following
  • All existing tests continue to pass
  • Code quality checks (ruff linting/formatting) pass

Testing

  • ✅ All 46 tests pass
  • ✅ Pre-commit hooks pass
  • ✅ No breaking changes to existing functionality

Impact

This change ensures proper handling of redirect responses from the Flagsmith API, improving reliability when the API returns 307 status codes.

- Added follow_redirects=True to httpx.AsyncClient configuration
- This resolves issues with 307 Temporary Redirect responses
- Ensures proper handling of redirect responses from Flagsmith API
- All existing tests continue to pass
@gagantrivedi gagantrivedi merged commit a123cac into Flagsmith:main Aug 19, 2025
2 checks passed
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