Hotfix/change domain
This commit is contained in:
parent
e5842dbd15
commit
0ca01965c9
@ -10,4 +10,7 @@ AURA_YANDEX_COUNTER_NUMBER=95799066
|
|||||||
AURA_PERSONAL_VIDEO_TIME_LIMIT=180
|
AURA_PERSONAL_VIDEO_TIME_LIMIT=180
|
||||||
AURA_GA_MEASUREMENT_ID=G-ECQDS5X0EH
|
AURA_GA_MEASUREMENT_ID=G-ECQDS5X0EH
|
||||||
AURA_UNLEASH_URL=https://unleash.admin.witapps.us/api/frontend
|
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
|
||||||
@ -10,4 +10,7 @@ AURA_YANDEX_COUNTER_NUMBER=95799066
|
|||||||
AURA_PERSONAL_VIDEO_TIME_LIMIT=100
|
AURA_PERSONAL_VIDEO_TIME_LIMIT=100
|
||||||
AURA_GA_MEASUREMENT_ID=G-4N17LL3BB5
|
AURA_GA_MEASUREMENT_ID=G-4N17LL3BB5
|
||||||
AURA_UNLEASH_URL=https://unleash.admin.witapps.us/api/frontend
|
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
|
||||||
@ -225,7 +225,7 @@ export interface PayloadGetLocale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getLocaleRequest = (data: 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);
|
const body = JSON.stringify(data);
|
||||||
return new Request(url, {
|
return new Request(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|||||||
@ -590,6 +590,14 @@ const routes = {
|
|||||||
createSession: () => [dApiHost, dApiPrefix, "session"].join("/"),
|
createSession: () => [dApiHost, dApiPrefix, "session"].join("/"),
|
||||||
updateSession: (id: string) => [dApiHost, dApiPrefix, "session", id].join("/"),
|
updateSession: (id: string) => [dApiHost, dApiPrefix, "session", id].join("/"),
|
||||||
getLocale: () => [dApiHost, dApiPrefix, "session", "locale"].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("/"),
|
getPixels: () => [dApiHost, dApiPrefix, "session", "pixels"].join("/"),
|
||||||
getFunnel: () => [dApiHost, dApiPrefix, "session", "funnel"].join("/"),
|
getFunnel: () => [dApiHost, dApiPrefix, "session", "funnel"].join("/"),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user