mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-02 19:56:05 +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",
|
"/login",
|
||||||
"/register",
|
"/register",
|
||||||
"/invite/",
|
"/invite/",
|
||||||
"/new",
|
|
||||||
"/poll/",
|
"/poll/",
|
||||||
"/quick-create",
|
|
||||||
"/auth/login",
|
"/auth/login",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (process.env.QUICK_CREATE_ENABLED === "true") {
|
||||||
|
publicRoutes.push("/quick-create", "/new");
|
||||||
|
}
|
||||||
|
|
||||||
export const middleware = withAuth(
|
export const middleware = withAuth(
|
||||||
async function middleware(req) {
|
async function middleware(req) {
|
||||||
const { nextUrl } = req;
|
const { nextUrl } = req;
|
||||||
|
|
Loading…
Add table
Reference in a new issue