How to configure Weaviate python client for separate OAUTH frontend

My weaviate service (running anonymous) is running behind a separate oauth frontend.

I can communicate with it via python requests ie:

requests.get(url=weaviate_conn['endpoint'], headers=weaviate_conn['headers']).text

I’ve tried two different auth_configs:

auth_config = weaviate.AuthBearerToken(access_token=weaviate_conn['headers']['Authorization'])


auth_config = weaviate.AuthApiKey(api_key=weaviate_conn['headers']['Authorization'])

with the weaviate python client:

client = weaviate.Client(url = weaviate_conn['endpoint'], auth_client_secret=auth_config)

and I get server 500 error at the frontend.

For posterity… The solution is additional_headers.

client = weaviate.Client(url = weaviate_conn['endpoint'], additional_headers=weaviate_conn['headers'])