Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-06 00:09:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-06 00:09:12 +0300
commit055dceef99269657e39c5264a8464b078e37e069 (patch)
tree998411da93402a473838f033bd01d56554f4cd2e /app/assets/javascripts/ide
parentbc4cd6ffb93ae695f20ea54f4e4803d50c78a69e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide')
-rw-r--r--app/assets/javascripts/ide/lib/gitlab_web_ide/get_base_config.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/assets/javascripts/ide/lib/gitlab_web_ide/get_base_config.js b/app/assets/javascripts/ide/lib/gitlab_web_ide/get_base_config.js
index dbb68b7facd..e131fb669ea 100644
--- a/app/assets/javascripts/ide/lib/gitlab_web_ide/get_base_config.js
+++ b/app/assets/javascripts/ide/lib/gitlab_web_ide/get_base_config.js
@@ -1,17 +1,15 @@
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 getGitLabUrl = (gitlabPath = '') => {
+ const path = joinPaths('/', window.gon.relative_url_root || '', gitlabPath);
const baseUrlObj = new URL(path, window.location.origin);
return cleanEndingSeparator(baseUrlObj.href);
};
export const getBaseConfig = () => ({
- baseUrl: getBaseUrl(),
- gitlabUrl: window.gon.gitlab_url,
+ // baseUrl - The URL which hosts the Web IDE static web assets
+ baseUrl: getGitLabUrl(process.env.GITLAB_WEB_IDE_PUBLIC_PATH),
+ // baseUrl - The URL for the GitLab instance
+ gitlabUrl: getGitLabUrl(''),
});