backend/config/middlewares.ts (view raw)
1export default [
2 "strapi::errors",
3 {
4 name: "strapi::security",
5 config: {
6 contentSecurityPolicy: {
7 directives: {
8 "script-src": ["'self'", "editor.unlayer.com"],
9 "frame-src": ["'self'", "editor.unlayer.com"],
10 "img-src": [
11 "'self'",
12 "data:",
13 "cdn.jsdelivr.net",
14 "strapi.io",
15 "s3.amazonaws.com",
16 ],
17 },
18 },
19 },
20 },
21 "strapi::cors",
22 "strapi::poweredBy",
23 "strapi::logger",
24 "strapi::query",
25 "strapi::body",
26 "strapi::session",
27 "strapi::favicon",
28 "strapi::public",
29
30 {
31 resolve: "./src/middlewares/graphql-logger",
32 config: {
33 enabled: true,
34 conf: {},
35 },
36 },
37];