|
|
|
@ -12,7 +12,7 @@ const { HTTP, HTTPS, KILOBYTES } = require('./MagicNumbers.json');
|
|
|
|
|
|
|
|
|
|
// Catch config.json not existing when running setup script
|
|
|
|
|
try {
|
|
|
|
|
var { useSsl, port, domain, isProxied, diskFilePath, saveWithDate, s3bucket, s3endpoint } = require('./config.json'); // skipcq: JS-0239, JS-0102
|
|
|
|
|
var { useSsl, port, domain, isProxied, diskFilePath, saveWithDate, s3bucket, s3endpoint, s3usePathStyle } = require('./config.json'); // skipcq: JS-0239, JS-0102
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
if (ex.code !== 'MODULE_NOT_FOUND') console.error(ex);
|
|
|
|
|
}
|
|
|
|
@ -26,7 +26,7 @@ function getTrueDomain(d = domain) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getS3url(s3key, ext) {
|
|
|
|
|
return `https://${s3bucket}.${s3endpoint}/${s3key}${ext}`;
|
|
|
|
|
return `https://${s3usePathStyle ? `${s3endpoint}/${s3bucket}` : `${s3bucket}.${s3endpoint}`}/${s3key}${ext}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getDirectUrl(resourceId) {
|
|
|
|
|