Fixed sandbox. Multiple tabs work now.
WiP on selectable mosaico templates. TODO: Make files always point to trusted URL, such that we don't have to rebase them. They are public anyway. The same goes for mosaico endpoints: /mosaico/templates and /mosaico/img
This commit is contained in:
parent
a4ee1534cc
commit
7788b0bc67
79 changed files with 724 additions and 390 deletions
|
@ -2,12 +2,18 @@
|
|||
|
||||
import mailtrainConfig from "mailtrainConfig";
|
||||
|
||||
let restrictedAccessToken = 'ANONYMOUS';
|
||||
|
||||
function setRestrictedAccessToken(token) {
|
||||
restrictedAccessToken = token;
|
||||
}
|
||||
|
||||
function getTrustedUrl(path) {
|
||||
return mailtrainConfig.trustedUrlBase + (path || '');
|
||||
}
|
||||
|
||||
function getSandboxUrl(path) {
|
||||
return mailtrainConfig.sandboxUrlBase + (path || '');
|
||||
return mailtrainConfig.sandboxUrlBase + restrictedAccessToken + '/' + (path || '');
|
||||
}
|
||||
|
||||
function getUrl(path) {
|
||||
|
@ -22,7 +28,7 @@ function getBaseDir() {
|
|||
if (mailtrainConfig.trusted) {
|
||||
return mailtrainConfig.trustedUrlBaseDir;
|
||||
} else {
|
||||
return mailtrainConfig.sandboxUrlBaseDir;
|
||||
return mailtrainConfig.sandboxUrlBaseDir + 'ANONYMOUS';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,5 +36,6 @@ export {
|
|||
getTrustedUrl,
|
||||
getSandboxUrl,
|
||||
getUrl,
|
||||
getBaseDir
|
||||
getBaseDir,
|
||||
setRestrictedAccessToken
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue