mirror of
https://github.com/strapi/strapi.git
synced 2025-08-29 19:22:24 +00:00

* feat: add content source maps service * chore: refactor to fp and async.pipe * chore: use header instead of query param * fix: ignore polymorphic relations * chore: add error handling * fix: arrays of relations and medias * chore: marc feedback * chore: use traverseEntity util * fix: make backend unit test async * chore: refactor types
47 lines
994 B
JavaScript
47 lines
994 B
JavaScript
'use strict';
|
|
|
|
const responseHandlers = require('./src/response-handlers');
|
|
|
|
module.exports = [
|
|
'strapi::logger',
|
|
'strapi::errors',
|
|
{
|
|
name: 'strapi::security',
|
|
config: {
|
|
contentSecurityPolicy: {
|
|
useDefaults: true,
|
|
directives: {
|
|
'frame-src': ["'self'"], // URLs that will be loaded in an iframe (e.g. Content Preview)
|
|
// Needed to load the `@vercel/stega` lib on the dummy-preview page
|
|
'script-src': ["'self'", "'unsafe-inline'", 'https://cdn.jsdelivr.net'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
'strapi::cors',
|
|
'strapi::poweredBy',
|
|
'strapi::query',
|
|
'strapi::body',
|
|
'strapi::session',
|
|
// 'strapi::compression',
|
|
// 'strapi::ip',
|
|
{
|
|
name: 'strapi::responses',
|
|
config: {
|
|
handlers: responseHandlers,
|
|
},
|
|
},
|
|
'strapi::favicon',
|
|
'strapi::public',
|
|
{
|
|
name: 'global::test-middleware',
|
|
config: {
|
|
foo: 'bar',
|
|
},
|
|
},
|
|
{
|
|
resolve: './src/custom/middleware.js',
|
|
config: {},
|
|
},
|
|
];
|