Skip to content

Commit

Permalink
remove hard code http scheme of short url #4656 (#4886)
Browse files Browse the repository at this point in the history
* remove hard code http scheme of short url #4656

* remove space

* add space

* remove temp var
  • Loading branch information
ripoul authored and mistercrunch committed Apr 27, 2018
1 parent f3d7560 commit 510ae84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down

0 comments on commit 510ae84

Please sign in to comment.