Skip to content

Commit a123cac

Browse files
authored
fix: enable follow_redirects for httpx client to handle 307 status codes (#164)
- 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
1 parent 99fc80e commit a123cac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/edge_proxy/server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
setup_logging(settings.logging)
2222
environment_service = EnvironmentService(
2323
LocalMemEnvironmentsCache(),
24-
httpx.AsyncClient(timeout=settings.api_poll_timeout_seconds),
24+
httpx.AsyncClient(
25+
timeout=settings.api_poll_timeout_seconds,
26+
follow_redirects=True,
27+
),
2528
settings,
2629
)
2730

0 commit comments

Comments
 (0)