Добавил чтение файла default-лицензии.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/nodeJSProjects@64933 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
Alexander.Trofimov
2015-09-24 15:38:16 +00:00
parent 8bce7da5ea
commit 7572951605
3 changed files with 26 additions and 1 deletions

View File

@ -1934,3 +1934,24 @@ exports.commandFromServer = function (req, res) {
}
});
};
exports.getDefaultLicense = function (req, res) {
logger.debug('Start getDefaultLicense request');
var options = {
root: config.get('server.default_license_file_path'),
dotfiles: 'deny',
headers: {
'x-timestamp': Date.now(),
'x-sent': true
}
};
res.sendFile(config.get('server.default_license_file_name'), options, function(err) {
if (err) {
logger.error(err);
res.status(err.status).end();
} else {
logger.debug('Sent success: license.lic)');
}
});
logger.debug('Start getDefaultLicense request');
};

View File

@ -87,6 +87,8 @@ if (cluster.isMaster) {
app.get('/' + fontsRoute + 'odttf/:fontname', fontService.getFont);
}
app.get('/license', docsCoServer.getDefaultLicense);
app.get('/ConvertService.ashx', converterService.convert);
app.post('/ConvertService.ashx', converterService.convert);

View File

@ -63,7 +63,9 @@
"editor_settings_readerformats": "doct;docx;doc;odt;rtf;txt;mht;html;htm;epub;mobi;fb2",
"editor_settings_editorformats": "doct;xlst;pptt;docx;doc;odt;xlsx;xls;ods;csv;pptx;ppt;ppsx;pps;odp;rtf;txt;mht;html;htm;epub;mobi;fb2",
"editor_settings_viewerformats": "pdf;xps;djvu;tiff",
"license_file_path": ""
"license_file_path": "",
"default_license_file_path": "./../../",
"default_license_file_name": "./license2.lic"
},
"utils": {
"utils_common_fontdir": "null",