mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 12:35:46 +03:00
⚡ Compress server responses
This commit is contained in:
parent
64e9b52f88
commit
1fff6e4d54
@ -39,6 +39,7 @@
|
||||
"dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/compression": "0.0.36",
|
||||
"@types/connect-history-api-fallback": "^1.3.1",
|
||||
"@types/convict": "^4.2.1",
|
||||
"@types/dotenv": "^6.1.1",
|
||||
@ -59,6 +60,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.18.3",
|
||||
"compression": "^1.7.4",
|
||||
"connect-history-api-fallback": "^1.6.0",
|
||||
"convict": "^5.0.0",
|
||||
"dotenv": "^8.0.0",
|
||||
|
@ -65,6 +65,8 @@ import * as parseUrl from 'parseurl';
|
||||
import * as config from '../config';
|
||||
// @ts-ignore
|
||||
import * as timezones from 'google-timezones-json';
|
||||
import * as compression from 'compression';
|
||||
|
||||
|
||||
class App {
|
||||
|
||||
@ -112,6 +114,8 @@ class App {
|
||||
|
||||
private config(): void {
|
||||
|
||||
this.app.use(compression());
|
||||
|
||||
// Get push connections
|
||||
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
if (req.url.indexOf('/rest/push') === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user