celery/modules/02-remap.js
2024-07-28 06:37:14 -07:00

16 lines
564 B
JavaScript

const fs = require("fs");
const file = require("../static.js");
const { version } = require("./03-cache.js");
module.exports = (app, dir, log) => {
const gone = (req, res) => res.status(410).render("410.html", { cache: { style: version("/assets/style.css") } });
const redir = (to) => (req, res, next) => req.path === to ? next() : res.redirect(to);
app.get("/gone", gone);
app.get("/nft", file("no.html"));
app.get("/upload", file("/private/upload.html"));
app.get("/read", redir("/read"));
app.get("/~skybldev", redir("https://skybldev.eu.org/"));
};