strapi/examples/getstarted/config/middlewares.js

40 lines
693 B
JavaScript
Raw Normal View History

'use strict';
const responseHandlers = require('./src/response-handlers');
module.exports = ({ env }) => [
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
{
name: 'strapi::session',
config: {
secretKeys: env('SESSION_SECRET_KEYS'),
},
},
2021-09-29 16:05:33 +02:00
// 'strapi::compression',
// 'strapi::ip',
{
name: 'strapi::responses',
config: {
handlers: responseHandlers,
},
},
'strapi::favicon',
'strapi::public',
2021-09-29 09:34:37 +02:00
{
name: 'global::test-middleware',
config: {
foo: 'bar',
},
},
{
resolve: './src/custom/middleware.js',
config: {},
},
];