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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'content/frontend/default/environment.js')
-rw-r--r--content/frontend/default/environment.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/content/frontend/default/environment.js b/content/frontend/default/environment.js
new file mode 100644
index 00000000..05e8ced5
--- /dev/null
+++ b/content/frontend/default/environment.js
@@ -0,0 +1,22 @@
+/**
+ * Utilities for determining site environment.
+ */
+
+export const GlHosts = [
+ {
+ environment: 'production',
+ host: 'docs.gitlab.com',
+ },
+ {
+ environment: 'review',
+ host: '35.193.151.162.nip.io',
+ },
+ {
+ environment: 'local',
+ host: 'localhost',
+ },
+];
+
+export function isGitLabHosted() {
+ return GlHosts.some((e) => window.location.host.includes(e.host));
+}