Private
Public Access
1
0

refacto: Changing some docker images to hardened non-root ones + README update

This commit is contained in:
gauvainboiche
2026-03-31 15:01:50 +02:00
parent 655928318e
commit a810906bcb
20 changed files with 1168 additions and 118 deletions

View File

@@ -1,6 +1,10 @@
import jwt from "jsonwebtoken";
export const JWT_SECRET = process.env.JWT_SECRET ?? "dev_secret_change_me";
if (!process.env.JWT_SECRET) {
throw new Error("[startup] JWT_SECRET environment variable is required but not set.");
}
export const JWT_SECRET = process.env.JWT_SECRET;
export function authMiddleware(req, res, next) {
const authHeader = req.headers["authorization"];