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:
[email protected]
With regards,
Apache Git Services