Skip to content

Scheduling infrastructure for absolutely everyone.

Enforce CSP on /login as well (#11610)

Hariom Balharac22d406d1217
diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts
index 8156b41c395..8f8b8da78f1 100644
--- a/apps/web/middleware.ts
+++ b/apps/web/middleware.ts
@@ -40,7 +40,7 @@ const middleware: NextMiddleware = async (req) => {
requestHeaders.set("x-cal-timezone", req.headers.get("x-vercel-ip-timezone") ?? "");
}
- if (url.pathname.startsWith("/auth/login")) {
+ if (url.pathname.startsWith("/auth/login") || url.pathname.startsWith("/login")) {
// Use this header to actually enforce CSP, otherwise it is running in Report Only mode on all pages.
requestHeaders.set("x-csp-enforce", "true");
}
@@ -68,6 +68,7 @@ export const config = {
matcher: [
"/:path*/embed",
"/api/trpc/:path*",
+ "/login",
"/auth/login",
/**
* Paths required by routingForms.handle