mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 18:15:41 +00:00
Set low cache-control headers for static pages
This commit is contained in:
@@ -114,9 +114,20 @@ export class SpacebarServer extends Server {
|
||||
|
||||
app.use("/imageproxy/:hash/:size/:url", ImageProxy);
|
||||
|
||||
app.get("/", (req, res) => res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "index.html")));
|
||||
app.get("/verify-email", (req, res) => res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "verify.html")));
|
||||
app.get("/widget", (req, res) => res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "widget.html")));
|
||||
app.get("/", (req, res) => {
|
||||
res.set("Cache-Control", "public, max-age=21600");
|
||||
return res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "index.html"));
|
||||
});
|
||||
|
||||
app.get("/verify-email", (req, res) => {
|
||||
res.set("Cache-Control", "public, max-age=21600");
|
||||
return res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "verify.html"));
|
||||
});
|
||||
|
||||
app.get("/widget", (req, res) => {
|
||||
res.set("Cache-Control", "public, max-age=21600");
|
||||
return res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "widget.html"));
|
||||
});
|
||||
|
||||
app.get("/_spacebar/api/schemas.json", (req, res) => {
|
||||
res.sendFile(path.join(ASSETS_FOLDER, "schemas.json"));
|
||||
|
||||
Reference in New Issue
Block a user