YARN-8469. [UI2] URL needs to be trimmed to handle index.html redirection while accessing via knox. Contributed by Sunil Govindan.
(cherry picked from commit a820738e34
)
This commit is contained in:
parent
e7f2c9886a
commit
00406f583b
|
@ -205,5 +205,13 @@ export default {
|
||||||
|
|
||||||
const skipTrailingSlash = function(path) {
|
const skipTrailingSlash = function(path) {
|
||||||
path = path.replace('ui2/', '');
|
path = path.replace('ui2/', '');
|
||||||
return path.replace(/\/$/, '');
|
path = path.replace(/\/$/, '');
|
||||||
|
console.log('base url:' + path)
|
||||||
|
if(path.includes("redirect")) {
|
||||||
|
var to = path.lastIndexOf('/');
|
||||||
|
to = to == -1 ? path.length : to + 1;
|
||||||
|
path = path.substring(0, to);
|
||||||
|
console.log('base url after redirect:' + path)
|
||||||
|
}
|
||||||
|
return path;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue