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

get_base_config.js « gitlab_web_ide « lib « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fbd2ce4ce693f5d278232e850a545f1d2eaa6ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { cleanEndingSeparator } from '~/lib/utils/url_utility';

const getBaseUrl = () => {
  const baseUrlObj = new URL(process.env.GITLAB_WEB_IDE_PUBLIC_PATH, window.location.origin);

  return cleanEndingSeparator(baseUrlObj.href);
};

export const getBaseConfig = () => ({
  baseUrl: getBaseUrl(),
  gitlabUrl: window.gon.gitlab_url,
});