You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/04/26 07:55:42 UTC

[GitHub] xrmx commented on a change in pull request #4886: remove hard code http scheme of short url #4656

xrmx commented on a change in pull request #4886: remove hard code http scheme of short url #4656
URL: https://github.com/apache/incubator-superset/pull/4886#discussion_r184299506
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -748,9 +748,10 @@ def shortner(self):
         obj = models.Url(url=url)
         db.session.add(obj)
         db.session.commit()
+        scheme = request.scheme
         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 = scheme, request=request, directory=directory, obj=obj),  
 
 Review comment:
   no spaces around =, and don't  add whitespace before new line please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services