diff --git a/postgrest/_async/client.py b/postgrest/_async/client.py index 32384da9..4f24212d 100644 --- a/postgrest/_async/client.py +++ b/postgrest/_async/client.py @@ -47,6 +47,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 226e9994..75dc6cfe 100644 --- a/postgrest/_sync/client.py +++ b/postgrest/_sync/client.py @@ -47,6 +47,7 @@ def create_session( base_url=base_url, headers=headers, timeout=timeout, + follow_redirects=True, ) def __enter__(self) -> SyncPostgrestClient: