[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15996658#comment-15996658 ] ASF GitHub Bot commented on FLINK-6367: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3769 > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15996257#comment-15996257 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on the issue: https://github.com/apache/flink/pull/3769 Patience please... > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15996039#comment-15996039 ] ASF GitHub Bot commented on FLINK-6367: --- Github user shijinkui commented on the issue: https://github.com/apache/flink/pull/3769 hi, @zentol @StephanEwen It didn't merge in. @zentol Please check again. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994702#comment-15994702 ] ASF GitHub Bot commented on FLINK-6367: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3769 @zentol Has this been merged? If yes, @shijinkui can you close the pull request manually? > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994583#comment-15994583 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on the issue: https://github.com/apache/flink/pull/3769 merging. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15992732#comment-15992732 ] ASF GitHub Bot commented on FLINK-6367: --- Github user shijinkui closed the pull request at: https://github.com/apache/flink/pull/3769 > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15992733#comment-15992733 ] ASF GitHub Bot commented on FLINK-6367: --- GitHub user shijinkui reopened a pull request: https://github.com/apache/flink/pull/3769 [FLINK-6367] support custom header settings of allow origin `jobmanager.web.access-control-allow-origin`: Enable custom access control parameter for allow origin header, default is `*`. - [X] General - The pull request references the related JIRA issue ("[FLINK-6367] support custom header settings of allow origin") - The pull request addresses only one issue - Each commit in the PR has a meaningful commit message (including the JIRA id) - [X] Documentation - Documentation has been added for new functionality - Old documentation affected by the pull request has been updated - JavaDoc for public methods has been added - [X] Tests & Build - Functionality added by the pull request is covered by tests - `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/hwstreaming/flink allow_origin Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3769.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 #3769 commit b6815edca3d38fed5da32175c32170fbbef084a0 Author: shijinkuiDate: 2017-04-25T12:09:15Z [FLINK-6367] support custom header settings of allow origin commit 62cfc7dd5e0575ca64fda2d9b13c4281550383bf Author: Jinkui Shi Date: 2017-04-25T15:18:38Z use ConfigOption wrap key and default value commit bd295833a038ebce45db921b843863d4221cd25d Author: Jinkui Shi Date: 2017-04-25T23:20:42Z code line format > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15984660#comment-15984660 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on the issue: https://github.com/apache/flink/pull/3769 Looks good, +1. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983806#comment-15983806 ] ASF GitHub Bot commented on FLINK-6367: --- Github user shijinkui commented on the issue: https://github.com/apache/flink/pull/3769 @zentol fix that > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983134#comment-15983134 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113241117 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorConfig.java --- @@ -78,4 +78,10 @@ public boolean isProgramSubmitEnabled() { ConfigConstants.JOB_MANAGER_WEB_SUBMIT_ENABLED_KEY, ConfigConstants.DEFAULT_JOB_MANAGER_WEB_SUBMIT_ENABLED); } + + public String getAllowOrigin() { + return config.getString( + ConfigConstants.JOB_MANAGER_WEB_ACCESS_CONTROL_ALLOW_ORIGIN.key(), --- End diff -- You can simplify this by using `Configuration#getString(ConfigOption option)` instead. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983133#comment-15983133 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113241783 --- Diff: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java --- @@ -1333,6 +1333,11 @@ key("jobmanager.web.address") .noDefaultValue(); + /** Web response header of Access-Control-Allow-Origin's key and default value. */ + public static final ConfigOption JOB_MANAGER_WEB_ACCESS_CONTROL_ALLOW_ORIGIN = + key("jobmanager.web.access-control-allow-origin").defaultValue("*"); + + --- End diff -- Remove this empty line. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983135#comment-15983135 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113241231 --- Diff: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java --- @@ -1333,6 +1333,11 @@ key("jobmanager.web.address") .noDefaultValue(); + /** Web response header of Access-Control-Allow-Origin's key and default value. */ + public static final ConfigOption JOB_MANAGER_WEB_ACCESS_CONTROL_ALLOW_ORIGIN = + key("jobmanager.web.access-control-allow-origin").defaultValue("*"); --- End diff -- please move `.defaultValue("*")` into a new line. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983132#comment-15983132 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113241708 --- Diff: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java --- @@ -1333,6 +1333,11 @@ key("jobmanager.web.address") .noDefaultValue(); + /** Web response header of Access-Control-Allow-Origin's key and default value. */ --- End diff -- Please replace this with "The config parameter defining the Access-Control-Allow-Origin header for all responses from the web-frontend". > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15983054#comment-15983054 ] ASF GitHub Bot commented on FLINK-6367: --- Github user shijinkui commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113226235 --- Diff: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java --- @@ -701,6 +701,9 @@ @Deprecated public static final String JOB_MANAGER_WEB_BACK_PRESSURE_DELAY = "jobmanager.web.backpressure.delay-between-samples"; + /** Web response header of Access-Control-Allow-Origin */ + public static final String JOB_MANAGER_WEB_ACCESS_CONTROL_ALLOW_ORIGIN = "jobmanager.web.access-control-allow-origin"; --- End diff -- Done. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15982787#comment-15982787 ] ASF GitHub Bot commented on FLINK-6367: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3769#discussion_r113178604 --- Diff: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java --- @@ -701,6 +701,9 @@ @Deprecated public static final String JOB_MANAGER_WEB_BACK_PRESSURE_DELAY = "jobmanager.web.backpressure.delay-between-samples"; + /** Web response header of Access-Control-Allow-Origin */ + public static final String JOB_MANAGER_WEB_ACCESS_CONTROL_ALLOW_ORIGIN = "jobmanager.web.access-control-allow-origin"; --- End diff -- please refactor this into a `ConfigOption`. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui >Assignee: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15982783#comment-15982783 ] ASF GitHub Bot commented on FLINK-6367: --- GitHub user shijinkui opened a pull request: https://github.com/apache/flink/pull/3769 [FLINK-6367] support custom header settings of allow origin `jobmanager.web.access-control-allow-origin`: Enable custom access control parameter for allow origin header, default is `*`. - [X] General - The pull request references the related JIRA issue ("[FLINK-6367] support custom header settings of allow origin") - The pull request addresses only one issue - Each commit in the PR has a meaningful commit message (including the JIRA id) - [X] Documentation - Documentation has been added for new functionality - Old documentation affected by the pull request has been updated - JavaDoc for public methods has been added - [X] Tests & Build - Functionality added by the pull request is covered by tests - `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/hwstreaming/flink allow_origin Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3769.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 #3769 commit b6815edca3d38fed5da32175c32170fbbef084a0 Author: shijinkuiDate: 2017-04-25T12:09:15Z [FLINK-6367] support custom header settings of allow origin > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15982764#comment-15982764 ] shijinkui commented on FLINK-6367: -- [~greghogan] We need configure some special allow_origin. For example, flink set the yarn url as flink allow origin so that forbidden the other urls. > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FLINK-6367) support custom header settings of allow origin
[ https://issues.apache.org/jira/browse/FLINK-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15981146#comment-15981146 ] Greg Hogan commented on FLINK-6367: --- Should we allow configuring any HTTP header? > support custom header settings of allow origin > -- > > Key: FLINK-6367 > URL: https://issues.apache.org/jira/browse/FLINK-6367 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend >Reporter: shijinkui > > `jobmanager.web.access-control-allow-origin`: Enable custom access control > parameter for allow origin header, default is `*`. -- This message was sent by Atlassian JIRA (v6.3.15#6346)