diff --git a/postgrest/_async/client.py b/postgrest/_async/client.py index 4c9a102f..4d23b2a4 100644 --- a/postgrest/_async/client.py +++ b/postgrest/_async/client.py @@ -48,6 +48,7 @@ def create_session( base_url=base_url, headers=headers, timeout=timeout, + follow_redirects=True, ) async def __aenter__(self) -> AsyncPostgrestClient: diff --git a/postgrest/_sync/client.py b/postgrest/_sync/client.py index f3ca5e7e..1d348746 100644 --- a/postgrest/_sync/client.py +++ b/postgrest/_sync/client.py @@ -48,6 +48,7 @@ def create_session( base_url=base_url, headers=headers, timeout=timeout, + follow_redirects=True, ) def __enter__(self) -> SyncPostgrestClient: