Hotfix/change domain

This commit is contained in:
Daniil Chemerkin 2025-07-14 12:47:12 +00:00
parent e5842dbd15
commit 0ca01965c9
4 changed files with 17 additions and 3 deletions

View File

@ -10,4 +10,7 @@ AURA_YANDEX_COUNTER_NUMBER=95799066
AURA_PERSONAL_VIDEO_TIME_LIMIT=180
AURA_GA_MEASUREMENT_ID=G-ECQDS5X0EH
AURA_UNLEASH_URL=https://unleash.admin.witapps.us/api/frontend
AURA_UNLEASH_CLIENT_KEY=*:development.7f714f98ed6e9128ae3c99906267292a4e34280d1a16becd2f0794b6
AURA_UNLEASH_CLIENT_KEY=*:development.7f714f98ed6e9128ae3c99906267292a4e34280d1a16becd2f0794b6
AURA_TRANSLATIONS_CDN=https://dev.api.aura.witapps.us
WITLAB_TRANSLATIONS_CDN=https://dev.api.aura.witapps.us

View File

@ -10,4 +10,7 @@ AURA_YANDEX_COUNTER_NUMBER=95799066
AURA_PERSONAL_VIDEO_TIME_LIMIT=100
AURA_GA_MEASUREMENT_ID=G-4N17LL3BB5
AURA_UNLEASH_URL=https://unleash.admin.witapps.us/api/frontend
AURA_UNLEASH_CLIENT_KEY=*:production.381ec8a37c977e928ff5ea8809fd943b7caff4232af6df8443903203
AURA_UNLEASH_CLIENT_KEY=*:production.381ec8a37c977e928ff5ea8809fd943b7caff4232af6df8443903203
AURA_TRANSLATIONS_CDN=https://cdn.aura.witapps.us
WITLAB_TRANSLATIONS_CDN=https://cdn.witlab.app

View File

@ -225,7 +225,7 @@ export interface PayloadGetLocale {
}
export const getLocaleRequest = (data: PayloadGetLocale) => {
const url = new URL(routes.server.getLocale());
const url = new URL(routes.server.getLocaleCDN());
const body = JSON.stringify(data);
return new Request(url, {
method: "POST",

View File

@ -590,6 +590,14 @@ const routes = {
createSession: () => [dApiHost, dApiPrefix, "session"].join("/"),
updateSession: (id: string) => [dApiHost, dApiPrefix, "session", id].join("/"),
getLocale: () => [dApiHost, dApiPrefix, "session", "locale"].join("/"),
getLocaleCDN: () => {
const currentDomain = window.location.hostname;
const isWitlabDomain = currentDomain.includes('witlab.app');
const cdnHost = isWitlabDomain
? import.meta.env.WITLAB_TRANSLATIONS_CDN
: import.meta.env.AURA_TRANSLATIONS_CDN;
return [cdnHost, dApiPrefix, "session", "locale"].join("/");
},
getPixels: () => [dApiHost, dApiPrefix, "session", "pixels"].join("/"),
getFunnel: () => [dApiHost, dApiPrefix, "session", "funnel"].join("/"),