This commit is contained in:
Cayo Puigdefabregas 2024-04-02 22:03:50 +02:00
parent 2a7a10178c
commit 8b4f4b2c6e

View file

@ -268,14 +268,14 @@ class AllowCodeOidc4vpView(GenericMixin):
db.session.add(code)
db.session.commit()
host = app.config.get('HOST')
host = app.config.get('HOST', '').strip("/")
if host == "localhost":
url_init = "http://{host}:5000/allow_code_oidc4vp2?code={code}"
else:
url_init = "https://{host}/allow_code_oidc4vp2?code={code}"
url = url_init.format(
host=app.config.get('HOST'),
host=host,
code=code.code
)
return url