Skip to content

Commit daba789

Browse files
authored
Fix middleware not found error by adding 'global::' prefix to custom middleware (#1723)
Resolved middleware not found error by adding 'global::' prefix to the custom middleware in the middleware.md file. The error occurred when the 'my-custom-node-module' middleware was not being recognized. By modifying the middleware configuration to 'global::my-custom-node-module', the middleware is now successfully detected and can be used.
1 parent 4182680 commit daba789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docusaurus/docs/dev-docs/configurations/middlewares.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = [
4040
'strapi::cors',
4141

4242
// custom middleware that does not require any configuration
43-
'my-custom-node-module',
43+
'global::my-custom-node-module',
4444

4545
// custom name to find a package or a path
4646
{

0 commit comments

Comments
 (0)