forked from bigcommerce/catalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
middleware.ts
25 lines (23 loc) · 972 Bytes
/
middleware.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { composeMiddlewares } from './middlewares/compose-middlewares';
import { withAuth } from './middlewares/with-auth';
import { withChannelId } from './middlewares/with-channel-id';
import { withIntl } from './middlewares/with-intl';
import { withRoutes } from './middlewares/with-routes';
export const middleware = composeMiddlewares(withAuth, withIntl, withChannelId, withRoutes);
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - api (API routes)
* - _next/static (static files)
* - _next/image (image optimization files)
* - _vercel (vercel internals, eg: web vitals)
* - favicon.ico (favicon file)
* - admin (admin panel)
* - sitemap.xml (sitemap route)
* - xmlsitemap.php (legacy sitemap route)
* - robots.txt (robots route)
*/
'/((?!api|admin|_next/static|_next/image|_vercel|favicon.ico|xmlsitemap.php|sitemap.xml|robots.txt).*)',
],
};