Read gateway uri from env

This commit is contained in:
Madis Mägi 2023-07-30 13:34:24 +03:00
parent a28189a306
commit 9f24016c7f

View File

@ -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)