You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/07/11 15:26:18 UTC

[GitHub] [incubator-superset] rahul-rahul-sp commented on a change in pull request #7840: update shortner endpoint to look at request headers origin instead of host

rahul-rahul-sp commented on a change in pull request #7840: update shortner endpoint to look at request headers origin instead of host
URL: https://github.com/apache/incubator-superset/pull/7840#discussion_r302605434
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1008,7 +1008,7 @@ def shortner(self):
         db.session.add(obj)
         db.session.commit()
         return Response(
-            "{scheme}://{request.headers[Host]}/r/{obj.id}".format(
+            "{request.headers[origin]}/r/{obj.id}".format(
 
 Review comment:
   i will double check on the schema but in my local testing it was getting added automatically.
   https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org