mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 09:56:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			833 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			833 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)
 | |
|         },
 | |
|       },
 | |
|     },
 | |
|   },
 | |
|   '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: {},
 | |
|   },
 | |
| ];
 | 
