You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by harshach <gi...@git.apache.org> on 2016/07/12 19:16:47 UTC

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

GitHub user harshach opened a pull request:

    https://github.com/apache/storm/pull/1557

    STORM-1960. Add CORS support to STORM UI Rest api

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/harshach/incubator-storm STORM-1960-1.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/1557.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1557
    
----
commit ef5cffa196cb0982f4e863f704c697fd471ad09e
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Date:   2016-07-12T19:15:24Z

    STORM-1960. Add CORS support to STORM UI Rest api.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/1557


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1557#discussion_r70651454
  
    --- Diff: storm-core/src/clj/org/apache/storm/ui/helpers.clj ---
    @@ -221,10 +221,7 @@
     (defnk json-response
       [data callback :serialize-fn to-json :status 200 :headers {}]
       {:status status
    -   :headers (merge {"Cache-Control" "no-cache, no-store"
    -                    "Access-Control-Allow-Origin" "*"
    -                    "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
    -              (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    +   :headers ((if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    --- End diff --
    
    @abellina cors support added in this patch returns those as part of the headers


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by arunmahadevan <gi...@git.apache.org>.
Github user arunmahadevan commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1557#discussion_r70657632
  
    --- Diff: storm-core/src/clj/org/apache/storm/ui/helpers.clj ---
    @@ -221,10 +221,7 @@
     (defnk json-response
       [data callback :serialize-fn to-json :status 200 :headers {}]
       {:status status
    -   :headers (merge {"Cache-Control" "no-cache, no-store"
    -                    "Access-Control-Allow-Origin" "*"
    -                    "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
    -              (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    +   :headers ((if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    --- End diff --
    
    I think you still need to put `merge` before the `if` since it has to be merged with the headers argument.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm issue #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by arunmahadevan <gi...@git.apache.org>.
Github user arunmahadevan commented on the issue:

    https://github.com/apache/storm/pull/1557
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by abellina <gi...@git.apache.org>.
Github user abellina commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1557#discussion_r70642673
  
    --- Diff: storm-core/src/clj/org/apache/storm/ui/helpers.clj ---
    @@ -221,10 +221,7 @@
     (defnk json-response
       [data callback :serialize-fn to-json :status 200 :headers {}]
       {:status status
    -   :headers (merge {"Cache-Control" "no-cache, no-store"
    -                    "Access-Control-Allow-Origin" "*"
    -                    "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
    -              (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    +   :headers ((if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    --- End diff --
    
    The Cache-Control no-cache, no-store is something we want to keep for json responses.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1557: STORM-1960. Add CORS support to STORM UI Rest api

Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1557#discussion_r70659523
  
    --- Diff: storm-core/src/clj/org/apache/storm/ui/helpers.clj ---
    @@ -221,10 +221,7 @@
     (defnk json-response
       [data callback :serialize-fn to-json :status 200 :headers {}]
       {:status status
    -   :headers (merge {"Cache-Control" "no-cache, no-store"
    -                    "Access-Control-Allow-Origin" "*"
    -                    "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
    -              (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    +   :headers ((if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
    --- End diff --
    
    @abellina you are right. Addressed in the PR.
    @arunmahadevan the change will address your comment as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---