From cf217a66919554b3f231bb724f5479b393f77713 Mon Sep 17 00:00:00 2001 From: Jules Date: Fri, 27 Apr 2018 17:41:54 +0200 Subject: [PATCH] remove hard code http scheme of short url #4656 (#4886) * remove hard code http scheme of short url #4656 * remove space * add space * remove temp var --- superset/views/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset/views/core.py b/superset/views/core.py index f66b70ef55a44..b60d91c485ca7 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -749,8 +749,8 @@ def shortner(self): db.session.add(obj) db.session.commit() return Response( - 'http://{request.headers[Host]}/{directory}?r={obj.id}'.format( - request=request, directory=directory, obj=obj), + '{scheme}://{request.headers[Host]}/{directory}?r={obj.id}'.format( + scheme=request.scheme, request=request, directory=directory, obj=obj), mimetype='text/plain') @expose('/msg/')