Commit 6e4b1564 authored by ChanHaeng Lee's avatar ChanHaeng Lee
Browse files

Add items to `config.matcher`

parent a47d29ea
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -18,12 +18,28 @@ export default replaceHost(
// More details: https://nextjs.org/docs/app/api-reference/file-conventions/middleware#config-object-optional.
export const config = {
  runtime: "nodejs",
  matcher: [{
  matcher: [
    {
      source: "/:path*",
    has: [{
      has: [
        {
          type: "header",
          key: "Accept",
          value: ".*application\\/((jrd|activity|ld)\\+json|xrd\\+xml).*",
    }],
  }],
        },
      ],
    },
    {
      source: "/:path*",
      has: [
        {
          type: "header",
          key: "content-type",
          value: ".*application\\/((jrd|activity|ld)\\+json|xrd\\+xml).*",
        },
      ],
    },
    { source: "/.well-known/nodeinfo" },
    { source: "/.well-known/x-nodeinfo2" },
  ],
};