@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
64 lines (63 loc) • 1.72 kB
JavaScript
/*
* Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
* This file is part of Sync-in | The open source file sync and share solution
* See the LICENSE file for licensing details
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: Object.getOwnPropertyDescriptor(all, name).get
});
}
_export(exports, {
get CONNECT_ERROR_CODE () {
return CONNECT_ERROR_CODE;
},
get CONTENT_SECURITY_POLICY () {
return CONTENT_SECURITY_POLICY;
},
get USER_AGENT () {
return USER_AGENT;
},
get VERSION () {
return VERSION;
}
});
const _appfunctions = require("./app.functions");
const VERSION = (0, _appfunctions.loadVersion)();
const USER_AGENT = `sync-in-server/${VERSION}`;
const CONTENT_SECURITY_POLICY = (onlyOfficeServer, collaboraServer)=>({
useDefaults: false,
directives: {
defaultSrc: [
"'self'",
onlyOfficeServer || '',
collaboraServer || ''
],
scriptSrc: [
"'self'",
"'unsafe-inline'",
onlyOfficeServer || ''
],
styleSrc: [
"'self'",
"'unsafe-inline'"
],
imgSrc: [
"'self'",
'data:'
],
fontSrc: [
"'self'"
]
}
});
const CONNECT_ERROR_CODE = new Set([
'ECONNREFUSED',
'ETIMEDOUT',
'ENOTFOUND'
]);
//# sourceMappingURL=app.constants.js.map