Uploaded August 2023 | Updated December 2026, 2 hours ago
This video looks at chaining multiple middleware functions in NextJs 13.
ππΌ The Ultimate NextJs Course
π hamedbahram.io/courses/nextjs
ππΌ Project source code (Github)
π github.com/HamedBahram/next-middleware-chain
ππΌ Inspired by Jasser's code β
π github.com/jmarioste/next-middleware-guide
Chapters
0:00 Intro
1:00 Simple middleware
3:00 Add second middleware
4:30 Simple composition
6:25 Add higher-order functions
10:00 Add the chain method
15:10 Reorganizing our middleware files
19:00 Outro
This video looks at chaining multiple middleware functions in NextJs 13.
ππΌ The Ultimate NextJs Course
π hamedbahram.io/courses/nextjs
ππΌ Project source code (Github)
π github.com/HamedBahram/next-middleware-chain
ππΌ Inspired by Jasser's code β
π github.com/jmarioste/next-middleware-guide
Chapters
0:00 Intro
1:00 Simple middleware
3:00 Add second middleware
4:30 Simple composition
6:25 Add higher-order functions
10:00 Add the chain method
15:10 Reorganizing our middleware files
19:00 Outro










