From f494f8c305017305b9cc87dceb36226a4a6d9df5 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Fri, 25 Oct 2024 06:00:41 -0400 Subject: [PATCH] Add API key auth to assets-service (#10) --- app/adapters/assets.py | 1 + app/settings.py | 1 + 2 files changed, 2 insertions(+) diff --git a/app/adapters/assets.py b/app/adapters/assets.py index 895c5d4..f0c50bb 100644 --- a/app/adapters/assets.py +++ b/app/adapters/assets.py @@ -6,6 +6,7 @@ assets_service_http_client = httpx.AsyncClient( base_url=settings.ASSETS_SERVICE_BASE_URL, + headers={"X-Api-Key": settings.ASSETS_SERVICE_API_KEY}, ) diff --git a/app/settings.py b/app/settings.py index d2c3fe9..4793c36 100644 --- a/app/settings.py +++ b/app/settings.py @@ -34,3 +34,4 @@ def read_bool(s: str) -> bool: AWS_S3_SECRET_ACCESS_KEY = os.environ["AWS_S3_SECRET_ACCESS_KEY"] ASSETS_SERVICE_BASE_URL = os.environ["ASSETS_SERVICE_BASE_URL"] +ASSETS_SERVICE_API_KEY = os.environ["ASSETS_SERVICE_API_KEY"]