Let's look at Next.js Middleware: Code that runs on the Edge.

Опубликовано: 19 Октябрь 2024
на канале: James Perkins
1,003
37

Next.js Middleware is an awesome feature that allows you to write code over configuration.

Blog Post I wrote about middleware: https://www.jamesperkins.dev/post/usi...

Join this channel to get access to perks:
   / @james-perkins  

Want to support the channel? Click below
https://www.buymeacoffee.com/jamesper...

Follow me on:
📃 Website/Blog: https://jamesperkins.dev
👉 Twitter:   / james_r_perkins  
👉 Linkedin:   / james-perkins-268992a4  
👉 Github: https://github.com/perkinsjr
👉 Discord :   / discord  

00:00 - Introduction
01:07 - Rewrite the URL
06:42 - Add a cookie
09:30 - Get the user's geolocation
14:14 - Adding a custom header
16:16 - Outro