mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Добавил чтение файла 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:
@ -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');
|
||||
};
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user