blob: dbb68b7facdbdccad2f3f5310529cd06064cff7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { cleanEndingSeparator, joinPaths } from '~/lib/utils/url_utility';
const getBaseUrl = () => {
const path = joinPaths(
'/',
window.gon.relative_url_root || '',
process.env.GITLAB_WEB_IDE_PUBLIC_PATH,
);
const baseUrlObj = new URL(path, window.location.origin);
return cleanEndingSeparator(baseUrlObj.href);
};
export const getBaseConfig = () => ({
baseUrl: getBaseUrl(),
gitlabUrl: window.gon.gitlab_url,
});
|