Logo
Explore Help
Register Sign In
yujunjun/strapi
1
0
Fork 0
You've already forked strapi
mirror of https://github.com/strapi/strapi.git synced 2025-07-11 19:13:05 +00:00
Code Issues Packages Projects Releases Wiki Activity
strapi/packages/cli/create-strapi-app/templates/example-js/config/middlewares.js

13 lines
224 B
JavaScript
Raw Permalink Normal View History

Add default config in generator
2021-09-28 12:06:53 +02:00
module.exports = [
Register logger middleware before errors middleware (#16921) In the examples and project templates the "errors" middleware which turn thrown errors into HTTP responses is registered before the "logger" middleware. This causes any errors thrown in controllers to pierce through the logger middleware resulting in these requests not being logged. Eg. when a controller throws a ValidationError the resulting HTTP 400 request is not logged at all. Change the order of middleware registration so that the logger is 'above' the errors middleware and has a chance to log *all* requests. Co-authored-by: DMehaffy <derrickmehaffy@gmail.com>
2023-12-05 17:28:41 +09:00
'strapi::logger',
Add default config in generator
2021-09-28 12:06:53 +02:00
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
Harmonize and make policies and middlwares more consistent
2021-10-04 18:16:28 +02:00
'strapi::query',
'strapi::body',
add session middleware to new project config + fix test app not using .env
2022-01-07 16:43:40 +01:00
'strapi::session',
Add default config in generator
2021-09-28 12:06:53 +02:00
'strapi::favicon',
'strapi::public',
];
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 857ms Template: 9ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API