Skip to content

Instantly share code, notes, and snippets.

@trnktms
Created October 15, 2022 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trnktms/044ded1b6cd93a5fb9e8ef2fcb405508 to your computer and use it in GitHub Desktop.
Save trnktms/044ded1b6cd93a5fb9e8ef2fcb405508 to your computer and use it in GitHub Desktop.
import type { NextRequest } from 'next/server'
export const config = {
matcher: [
/* force middleware on root */
'/',
/* bypass middleware for Sitecore Experience Editor */
'/((?!api/editing/.?).*)',
],
};
export function middleware(request: NextRequest) {
console.log('MIDDLEWARE HIT');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment