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

This commit is contained in:
Luke Vella 2025-01-27 15:54:30 +00:00 committed by GitHub
parent 58d5c42a6c
commit af6f7b6140
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;