enforced authentication for APIs, vite .env configuration for auth & jobs

This commit is contained in:
Felix Kaspar
2024-05-30 01:03:15 +02:00
parent c19bc8d07a
commit fc3e2adc82
8 changed files with 48 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ import { Express } from "express";
export function connect(app: Express) {
app.use(session({
secret: process.env.SESSION_SECRET || "default-secret",
secret: import.meta.env.VITE_SESSION_SECRET || "default-secret",
resave: false,
saveUninitialized: false
}));