1
0
Fork 0

Add proxy support

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-10-09 17:26:04 +02:00
parent 9eed255e2e
commit a98807a467
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 5 additions and 3 deletions

View file

@ -9,8 +9,9 @@
"version": "1.0.0",
"type": "module",
"scripts": {
"build": "tsc --build",
"clean": "tsc --build --clean",
"build": "tsc -b",
"clean": "tsc -b --clean",
"dev": "tsc -b -w",
"start": "node ./dist/index.js"
},
"repository": {

View file

@ -9,6 +9,7 @@ const app = express();
app.use(helmet());
app.use(morgan("combined"));
app.set("trust proxy", "loopback");
// app.use(morgan(process.env.NODE_ENV === "production" ? "tiny" : "dev"));
app.use(express.json());
@ -37,7 +38,7 @@ Disallow: /`);
});
app.get("/source", (_req, res) => {
res.redirect(301, "https://git.freecumextremist.com/grumbulon/waifurudor.de");
res.redirect(301, "https://git.froth.zone/sam/waifurudor.de");
});
// For 404s