]> Untitled Git - lemmy-ui.git/commitdiff
Fix authorized route false flag
authorSleeplessOne1917 <abias1122@gmail.com>
Thu, 29 Jun 2023 22:12:22 +0000 (18:12 -0400)
committerSleeplessOne1917 <abias1122@gmail.com>
Thu, 29 Jun 2023 22:12:22 +0000 (18:12 -0400)
src/server/middleware.ts
src/shared/utils/app/is-auth-path.ts

index f64b781db24783f53b0187d54cf01666f4a2050f..235f07296cdc155ebf41d9d2389e8db0f2f20052 100644 (file)
@@ -29,8 +29,6 @@ export function setCacheControl(
 ) {
   const user = UserService.Instance;
   let caching: string;
-  console.log("In middleware");
-  console.log(process.env.NODE_ENV);
 
   if (
     process.env.NODE_ENV === "production" &&
index 0ec963a2cf581ed18d445b135df260204de76c99..5a201ac427ee90701107b6376cf714b854793bbb 100644 (file)
@@ -1,5 +1,5 @@
 export default function isAuthPath(pathname: string) {
-  return /create_.*|inbox|settings|admin|reports|registration_applications/g.test(
+  return /^\/create_.*|inbox|settings|admin|reports|registration_applications/g.test(
     pathname
   );
 }