Client's public folder renamed to static

Regular campaign sender seems to have most of the code in place. (Not tested.)
This commit is contained in:
Tomas Bures 2018-09-18 10:30:13 +02:00
parent 89eabea0de
commit 63765f7222
354 changed files with 836 additions and 324 deletions

View file

@ -12,6 +12,10 @@ function getSandboxUrlBase() {
return urllib.resolve(config.www.sandboxUrlBase, '');
}
function getPublicUrlBase() {
return urllib.resolve(config.www.publicUrlBase, '');
}
function getTrustedUrl(path) {
return urllib.resolve(config.www.trustedUrlBase, path || '');
}
@ -24,21 +28,34 @@ function getSandboxUrl(path, context) {
}
}
function getPublicUrl(path) {
return urllib.resolve(config.www.publicUrlBase, path || '');
}
function getTrustedUrlBaseDir() {
const ivisUrl = urllib.parse(config.www.trustedUrlBase);
return ivisUrl.pathname;
const mailtrainUrl = urllib.parse(config.www.trustedUrlBase);
return mailtrainUrl.pathname;
}
function getSandboxUrlBaseDir() {
const ivisUrl = urllib.parse(config.www.sandboxUrlBase);
return ivisUrl.pathname;
const mailtrainUrl = urllib.parse(config.www.sandboxUrlBase);
return mailtrainUrl.pathname;
}
function getPublicUrlBaseDir() {
const mailtrainUrl = urllib.parse(config.www.publicUrlBase);
return mailtrainUrl.pathname;
}
module.exports = {
getTrustedUrl,
getSandboxUrl,
getPublicUrl,
getTrustedUrlBase,
getSandboxUrlBase,
getPublicUrlBase,
getTrustedUrlBaseDir,
getSandboxUrlBaseDir
getSandboxUrlBaseDir,
getPublicUrlBaseDir
};