fix host
This commit is contained in:
parent
2a7a10178c
commit
8b4f4b2c6e
|
@ -268,14 +268,14 @@ class AllowCodeOidc4vpView(GenericMixin):
|
||||||
db.session.add(code)
|
db.session.add(code)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
host = app.config.get('HOST')
|
host = app.config.get('HOST', '').strip("/")
|
||||||
if host == "localhost":
|
if host == "localhost":
|
||||||
url_init = "http://{host}:5000/allow_code_oidc4vp2?code={code}"
|
url_init = "http://{host}:5000/allow_code_oidc4vp2?code={code}"
|
||||||
else:
|
else:
|
||||||
url_init = "https://{host}/allow_code_oidc4vp2?code={code}"
|
url_init = "https://{host}/allow_code_oidc4vp2?code={code}"
|
||||||
|
|
||||||
url = url_init.format(
|
url = url_init.format(
|
||||||
host=app.config.get('HOST'),
|
host=host,
|
||||||
code=code.code
|
code=code.code
|
||||||
)
|
)
|
||||||
return url
|
return url
|
||||||
|
|
Reference in New Issue