mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
nodejs: remove /files route (8bcc15e320)
This commit is contained in:
@ -81,14 +81,6 @@ app.use((req, res, next) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.use(express.static(path.join(__dirname, 'public'))); // public directory
|
app.use(express.static(path.join(__dirname, 'public'))); // public directory
|
||||||
// check if there are static files such as .js, .css files, images, samples and process them
|
|
||||||
if (config.has('server.static')) {
|
|
||||||
const staticContent = config.get('server.static');
|
|
||||||
for (let i = 0; i < staticContent.length; i++) {
|
|
||||||
const staticContentElem = staticContent[i];
|
|
||||||
app.use(staticContentElem.name, express.static(staticContentElem.path, staticContentElem.options));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
app.use(favicon(`${__dirname}/public/images/favicon.ico`)); // use favicon
|
app.use(favicon(`${__dirname}/public/images/favicon.ico`)); // use favicon
|
||||||
|
|
||||||
app.use(bodyParser.json()); // connect middleware that parses json
|
app.use(bodyParser.json()); // connect middleware that parses json
|
||||||
|
|||||||
@ -26,12 +26,6 @@
|
|||||||
"storagePath": "/files",
|
"storagePath": "/files",
|
||||||
"maxFileSize": 1073741824,
|
"maxFileSize": 1073741824,
|
||||||
"mobileRegEx": "android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino",
|
"mobileRegEx": "android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino",
|
||||||
"static":[
|
|
||||||
{
|
|
||||||
"name": "/files",
|
|
||||||
"path": "./files"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"token": {
|
"token": {
|
||||||
"enable": false,
|
"enable": false,
|
||||||
"useforrequest": true,
|
"useforrequest": true,
|
||||||
|
|||||||
@ -2,12 +2,6 @@
|
|||||||
"server": {
|
"server": {
|
||||||
"siteUrl": "/",
|
"siteUrl": "/",
|
||||||
"maxFileSize": 104857600,
|
"maxFileSize": 104857600,
|
||||||
"storageFolder": "/var/lib/onlyoffice/documentserver-example/files",
|
"storageFolder": "/var/lib/onlyoffice/documentserver-example/files"
|
||||||
"static":[
|
|
||||||
{
|
|
||||||
"name": "/files",
|
|
||||||
"path": "/var/lib/onlyoffice/documentserver-example/files"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"server": {
|
"server": {
|
||||||
"siteUrl": "/",
|
"siteUrl": "/",
|
||||||
"maxFileSize": 104857600,
|
"maxFileSize": 104857600
|
||||||
"static":[
|
|
||||||
{
|
|
||||||
"name": "/files",
|
|
||||||
"path": "./files",
|
|
||||||
"options": {"maxAge": "7d"}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user