mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +02:00
🐛 Keep paths private if quick create not enabled (#1519)
This commit is contained in:
parent
58d5c42a6c
commit
af6f7b6140
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue