-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathenvironment.js
More file actions
23 lines (16 loc) · 905 Bytes
/
environment.js
File metadata and controls
23 lines (16 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export const updateTokenConfig = (config) => {
if (document.location.hostname !== "localhost"){
if (document.location.hostname.startsWith("192.168.")){
config.tokenOrigin = document.location.protocol + "//" + document.location.hostname + ":3002";
return config;
}
if (document.location.pathname.indexOf("token-negotiator-examples") > -1){
// config.tokenOrigin = "https://tokenscript.github.io/token-negotiator-examples/token-outlet-website/";
config.tokenOrigin = "https://outlet-stage.brandconnector.io/";
} else if (document.location.pathname.indexOf("token-negotiator-gh-pages") > -1){
// config.tokenOrigin = "https://tokenscript.github.io/token-negotiator-gh-pages/token-outlet-website/";
config.tokenOrigin = "https://outlet.brandconnector.io/";
}
}
return config;
}