From 8b4f4b2c6ec0f0573537b22eeb1d95278f8a2e7a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 2 Apr 2024 22:03:50 +0200 Subject: [PATCH] fix host --- ereuse_devicehub/modules/oidc/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/modules/oidc/views.py b/ereuse_devicehub/modules/oidc/views.py index 2a18b795..4bec1ea6 100644 --- a/ereuse_devicehub/modules/oidc/views.py +++ b/ereuse_devicehub/modules/oidc/views.py @@ -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