This commit is contained in:
Cayo Puigdefabregas 2024-04-02 22:03:50 +02:00
parent 2a7a10178c
commit 8b4f4b2c6e
1 changed files with 2 additions and 2 deletions

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