Skip to content

Commit

Permalink
chore: fix exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshify committed Dec 18, 2024
1 parent a7ee5bb commit dd12000
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/authMiddleware/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,6 @@ import { getIdToken } from "../utils/getIdToken";
import { OAuth2CodeExchangeResponse } from "@kinde-oss/kinde-typescript-sdk";
import { copyCookiesToRequest } from "../utils/copyCookiesToRequest";

/**
* Standard middleware matcher pattern for Next.js applications
*
* This regex pattern matches all routes except:
* - Next.js internal routes (_next/*)
* - Static files with common extensions:
* - HTML/CSS: .html, .css
* - Scripts: .js (but not .json)
* - Images: .jpg, .jpeg, .webp, .png, .gif, .svg
* - Fonts: .ttf, .woff, .woff2
* - Documents: .csv, .doc, .docx, .xls, .xlsx
* - Other: .ico, .zip, .webmanifest
*
* Use this as the matcher config in Next.js middleware to protect all routes
* except static assets and Next.js internals.
*/
export const kindeStandardMiddlewareMatcher = '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)'

const handleMiddleware = async (req, options, onSuccess) => {
const { pathname } = req.nextUrl;

Expand Down

0 comments on commit dd12000

Please sign in to comment.