From eca9e6a19c335f4ada867b00708a6187179edb79 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 12 Jan 2024 17:30:27 +0100 Subject: [PATCH] fix domain in url in certificate pdf --- idhub/user/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idhub/user/views.py b/idhub/user/views.py index b04746b..6bdbfd0 100644 --- a/idhub/user/views.py +++ b/idhub/user/views.py @@ -143,8 +143,9 @@ class CredentialPdfView(MyWallet, TemplateView): public=True, user=self.request.user ) - self.url_id = "{}/public/credentials/{}".format( - settings.DOMAIN.strip("/"), + self.url_id = "{}://{}/public/credentials/{}".format( + self.request.scheme, + self.request.get_host(), self.object.hash )