Преглед на файлове

YARN-6258. localBaseAddress for CORS proxy configuration is not working when suffixed with forward slash in new YARN UI. Contributed by Gergely Novák.

Sunil G преди 8 години
родител
ревизия
deef8d5446
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/services/hosts.js

+ 5 - 1
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 () {