Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Keep paths private if quick create not enabled (#1519)

Luke Vellaaf6f7b614022
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index 549a4e111..9965cd362 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -12,12 +12,14 @@ const publicRoutes = [
"/login",
"/register",
"/invite/",
- "/new",
"/poll/",
- "/quick-create",
"/auth/login",
];
+if (process.env.QUICK_CREATE_ENABLED === "true") {
+ publicRoutes.push("/quick-create", "/new");
+}
+
export const middleware = withAuth(
async function middleware(req) {
const { nextUrl } = req;