From ad24464be85bf37bf1677da1a2701a6acd7999d2 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Fri, 7 Apr 2017 11:42:50 +0530 Subject: [PATCH] =?UTF-8?q?YARN-6258.=20localBaseAddress=20for=20CORS=20pr?= =?UTF-8?q?oxy=20configuration=20is=20not=20working=20when=20suffixed=20wi?= =?UTF-8?q?th=20forward=20slash=20in=20new=20YARN=20UI.=20Contributed=20by?= =?UTF-8?q?=20Gergely=20Nov=C3=A1k.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hadoop-yarn-ui/src/main/webapp/app/services/hosts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 19863e1c8d..807844e2b2 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 () {