-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50482/#review143773
-----------------------------------------------------------
I would really like to avoid {{jsonp}} (as it is basically a giant hack to
avoid this problem) and also setting {{Access-Control-Allow-Origin}} as I
believe (this is my opinion) it should only be used for developing and surfaces
a problem that we have to fix.
I am struggling with understanding why this problem emerges in the first place?
This error only gets thrown if the client requests data from a different domain
than where the assets came from.
Is it because the UI loads before it redirects to the leading master? If so, I
believe the right solution here is to handle this (redirect) server side,
before the UI loads.
This way the UI never has to know anything about where it needs to get its data
and can always fetch data from the domain it came from.
I hope that makes sense
- Michael Lunøe
On July 27, 2016, 9:35 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50482/
> -----------------------------------------------------------
>
> (Updated July 27, 2016, 9:35 a.m.)
>
>
> Review request for mesos, Adam B, Jie Yu, Michael Lunøe, Vinod Kone, and
> Jiang Yan Xu.
>
>
> Bugs: MESOS-5911
> https://issues.apache.org/jira/browse/MESOS-5911
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The redirection in WEB UI is broken since the CORS restriction after
> we enabled redirection in `master/state` endpoint in
> https://reviews.apache.org/r/34646/. We change the request way to
> `master/state` endpoint from xhr to jsonp for bypassing the CORS
> restriction.
>
>
> Diffs
> -----
>
> src/webui/master/static/index.html a083537cd718162d1913842bddbd2653d8c52337
> src/webui/master/static/js/controllers.js
> ceaf1402ebdae4efd1a8a6fc9c7b795de69e2fc0
>
> Diff: https://reviews.apache.org/r/50482/diff/
>
>
> Testing
> -------
>
> Testing video record
>
> 
>
>
> Thanks,
>
> haosdent huang
>
>