Skip to content

Commit

Permalink
GR-580 compress responses
Browse files Browse the repository at this point in the history
  • Loading branch information
callunity committed May 17, 2018
1 parent 692eca4 commit d87d6bf
Show file tree
Hide file tree
Showing 3 changed files with 1,747 additions and 1,163 deletions.
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const logger = require('./utils/logger'); // logging
const uid = require('uid'); // generates a unique ID for each request
const helmet = require('helmet');
const cors = require('cors');
const compression = require('compression');

const app = express();
const ignoreFrom = process.env.IGNORE_ADDRESS || ''; // to skip logging of requests from IT's security tests
Expand All @@ -34,6 +35,7 @@ const errorHandler = (err, req, res, next) => {

app.use(helmet());
app.use(cors());
app.use(compression());
app.use(bodyParser.json({ type: 'application/json', limit: '50mb' }));
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
app.use('/api/v1', express.Router());
Expand Down
Loading

0 comments on commit d87d6bf

Please sign in to comment.