YARN-6258. localBaseAddress for CORS proxy configuration is not working when suffixed with forward slash in new YARN UI. Contributed by Gergely Novák.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/deef8d54 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/deef8d54 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/deef8d54 Branch: refs/heads/YARN-3368_branch2 Commit: deef8d544698fe9c1adfae7b27a343a30b05ce0e Parents: 16cc282 Author: Sunil G <sun...@apache.org> Authored: Fri Apr 7 11:42:50 2017 +0530 Committer: Varun Saxena <varunsax...@apache.org> Committed: Wed Oct 18 02:06:48 2017 +0530 ---------------------------------------------------------------------- .../hadoop-yarn-ui/src/main/webapp/app/services/hosts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/deef8d54/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js index 19863e1..807844e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js @@ -61,7 +61,11 @@ export default Ember.Service.extend({ }, localBaseAddress: Ember.computed(function () { - return this.localAddress(); + var url = this.localAddress(); + if (url.endsWith('/')) { + url = url.slice(0, -1); + } + return url; }), timelineWebAddress: Ember.computed(function () { --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org