From 9f24016c7f245b211417d198d9ad2099222d8aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20M=C3=A4gi?= Date: Sun, 30 Jul 2023 13:34:24 +0300 Subject: [PATCH] Read gateway uri from env --- inventory-app/oidc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inventory-app/oidc.py b/inventory-app/oidc.py index 080d375..266b21a 100644 --- a/inventory-app/oidc.py +++ b/inventory-app/oidc.py @@ -10,7 +10,8 @@ from functools import wraps page_oidc = Blueprint("oidc", __name__) db = MongoClient(const.MONGO_URI).get_default_database() -metadata = requests.get("https://auth.codemowers.eu/.well-known/openid-configuration").json() +gw_uri = os.getenv("OIDC_GATEWAY_URI") +metadata = requests.get(f"{gw_uri}.well-known/openid-configuration").json() def login_required(f): @wraps(f)