You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/04 13:12:13 UTC

[GitHub] [pulsar] newur opened a new pull request #11924: [broker] add setting to enable CORS

newur opened a new pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924


   ### Motivation
   
   
   I want to develop an own frontend (SPA) for Pulsar, similar to Pulsar Manager. The frontend should be able to make REST calls directly to a (local) broker. Currently, this the browser blocks the requests, due to different origins for front- and backend (CORS policy). I know it could be worked around with a reverse proxy, but I would like to keep the setup simple.
   
   See also https://github.com/apache/pulsar-manager/issues/219
   
   ### Modifications
   
   Add a servlet Filter that adds the required CORS headers, if allowedOrigins are configured.
   
   ### Verifying this change
   
   This change added tests and can be verified as follows:
   
   Since CORS is a security measure that requires a browser, I am not sure how this can be tested best in your CI. Would need some guidance on this. 
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API: no
     - The schema: no
     - The default values of configurations: no - value is empty by default
     - The wire protocol: no
     - The rest endpoints: no
     - The admin cli options: no
     - Anything that affects deployment: no
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
     
   - [ x ] no-need-doc 
     
   Looks like doc for ServiceConfiguration.class is generated from the annotation.
   
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] thomasechen commented on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
thomasechen commented on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-1063684543


   Dear All,
   
    This request is cool and will you consider to merge into the project ?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] newur commented on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
newur commented on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-912973137


   Please notice this PR contains 2 possible ways to configure the CORS filter class. I prefer the current approach, but the comments showcase an alternative. Let me know which one you would prefer, so I can remove the other one.
   
   One has to be removed before the merge.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] newur commented on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
newur commented on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-1009293941


   Is there any news on this PR?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] newur edited a comment on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
newur edited a comment on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-912973137


   Please notice this PR contains 2 possible ways to configure the CORS filter class. I prefer the current approach, but the comments showcase an alternative - using the `CorsFilter`. Let me know which one you would prefer, so I can remove the other one.
   
   The final pull request should only contain one approach.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-1057583576


   The pr had no activity for 30 days, mark with Stale label.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] newur edited a comment on pull request #11924: [broker] add setting to enable CORS

Posted by GitBox <gi...@apache.org>.
newur edited a comment on pull request #11924:
URL: https://github.com/apache/pulsar/pull/11924#issuecomment-912973137


   Please notice this PR contains 2 possible ways to configure the CORS filter class. I prefer the current approach, but the comments showcase an alternative - using the `CorsFilter`. Let me know which one you would prefer, so I can remove the other one.
   
   One has to be removed before the merge.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org