]> Untitled Git - lemmy-ui.git/commitdiff
wip
authorAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Fri, 30 Jun 2023 14:04:19 +0000 (10:04 -0400)
committerAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Fri, 30 Jun 2023 14:04:19 +0000 (10:04 -0400)
src/server/middleware.ts

index 24ae1b95f42caf6857d786f898422a9e47dab9b9..0420e47e8a1dcfe67707ae3a5f99669bd8bdc764 100644 (file)
@@ -27,12 +27,12 @@ export function setCacheControl(
   res: Response,
   next: NextFunction
 ) {
-  let caching: string;
-
   if (process.env.NODE_ENV !== "production") {
     return next();
   }
 
+  let caching: string;
+
   if (
     req.path.match(/\.(js|css|txt|manifest\.webmanifest)\/?$/) ||
     req.path.includes("/css/themelist")