Next.js · Middle · Question 45 of 75

How do you limit which paths proxy.ts runs on?

Explanation

export const config = { matcher: ['/dashboard/:path*'] } - proxy runs only for matching paths. Static files and _next are usually excluded to save resources. There's one proxy per project, located at the root (or in src).

Further reading

Problem with a question

Next.js · Middle · question 45

Test yourself

Take the Next.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz