From bb851bfae70d36f40d75a85da58274e75e19eadb Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Sat, 1 Jun 2024 16:39:06 -0300 Subject: [PATCH] Follow redirects (#449) --- postgrest/_async/client.py | 1 + postgrest/_sync/client.py | 1 + 2 files changed, 2 insertions(+) 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: