supabase / supabase-py

Python Client for Supabase. Query Postgres from Flask, Django, FastAPI. Python user authentication, security policies, edge functions, file storage, and realtime data streaming. Good first issue.
https://supabase.com/docs/reference/python
MIT License
1.66k stars 194 forks source link

Supabase-py through outbound http proxy #522

Closed theveloped closed 1 year ago

theveloped commented 1 year ago

I'd like to use supabse-py in an app that is deployed behind a http proxy. It seems supabase does not use the system proxy settings to route requests. Is there a way to specify a http proxy to be used by the client?

theveloped commented 1 year ago

It seems the lower level libraries will correctly follow the environment settings for proxies. Setting these in your code like below should solve the issue if others have the same problem. Note, this is a global setting and as such might interfere with more then just supabase:

import os
os.environ['HTTP_PROXY'] = 'http://proxyaddress:8080'
os.environ['HTTPS_PROXY'] = 'http://proxyaddress:8080'
theveloped commented 1 year ago

As such I'll close this for now.