diff --git a/next.config.ts b/next.config.ts index d33e7c0..d80b7a8 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next" const nextConfig: NextConfig = { - output: "standalone", + output: process.env.DOCKER === "1" ? "standalone" : undefined, eslint: { ignoreDuringBuilds: true }, diff --git a/src/middleware.ts b/src/middleware.ts new file mode 100644 index 0000000..6651223 --- /dev/null +++ b/src/middleware.ts @@ -0,0 +1,9 @@ +import { NextRequest } from "next/server" + +export async function middleware(req: NextRequest) { + console.log(`[Middleware] ${req.method} ${req.nextUrl.pathname}`) +} + +export const config = { + matcher: "/(.*)" +}