From: SleeplessOne1917 Date: Thu, 29 Jun 2023 22:12:22 +0000 (-0400) Subject: Fix authorized route false flag X-Git-Url: http://these/git/%7B%60%24%7BarchiveUrl%7D/static/gitweb.js?a=commitdiff_plain;h=cc184a86c82943ba78588736cc19c9f4a04e22b4;p=lemmy-ui.git Fix authorized route false flag --- diff --git a/src/server/middleware.ts b/src/server/middleware.ts index f64b781..235f072 100644 --- a/src/server/middleware.ts +++ b/src/server/middleware.ts @@ -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" && diff --git a/src/shared/utils/app/is-auth-path.ts b/src/shared/utils/app/is-auth-path.ts index 0ec963a..5a201ac 100644 --- a/src/shared/utils/app/is-auth-path.ts +++ b/src/shared/utils/app/is-auth-path.ts @@ -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 ); }