Skip to content

Commit

Permalink
Merge pull request #113 from BudsiesApp/33613-optimize-requests-perfo…
Browse files Browse the repository at this point in the history
…rmance

#33613: Optimize requests performance
  • Loading branch information
gorbunovav authored Dec 10, 2024
2 parents 4f90adc + 6381ba8 commit 013af22
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import express from 'express';
import compression from 'compression';
import cors from 'cors';
import morgan from 'morgan';
import bodyParser from 'body-parser';
Expand All @@ -18,6 +19,7 @@ import * as path from 'path'

const app = express();
app.enable('trust proxy');
app.use(compression());

const httpLogFormat = process.env.LOG_HTTP_FORMAT || 'dev'

Expand All @@ -44,7 +46,8 @@ app.use('/media', express.static(path.join(__dirname, config.get(`${config.get('

// 3rd party middleware
app.use(cors({
exposedHeaders: config.get('corsHeaders')
exposedHeaders: config.get('corsHeaders'),
maxAge: 86400
}));

app.use(bodyParser.json({
Expand Down

0 comments on commit 013af22

Please sign in to comment.