refacto: Changing some docker images to hardened non-root ones + README update
This commit is contained in:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user