sets cache-control on static user images

This commit is contained in:
nai-degen 2024-03-10 15:50:40 -05:00
parent e0bf10626e
commit 7f431de98e
2 changed files with 2 additions and 3 deletions

View File

@ -61,7 +61,7 @@ app.set("views", [
path.join(__dirname, "shared/views"),
]);
app.use("/user_content", express.static(USER_ASSETS_DIR));
app.use("/user_content", express.static(USER_ASSETS_DIR, { maxAge: "2h" }));
app.get("/health", (_req, res) => res.sendStatus(200));
app.use(cors());

View File

@ -35,8 +35,6 @@
<% } else { %>
<p>No images found.</p>
<% } %>
<%- include("partials/user_footer") %>
<style>
.image-history {
display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
@ -69,3 +67,4 @@
}
}
</style>
<%- include("partials/user_footer") %>