Phase 7: Frontend auth — React Router, AuthContext, Login/Register, API client
This commit is contained in:
@@ -36,6 +36,7 @@ export interface Env {
|
||||
readonly jwtSecret: string;
|
||||
readonly jwtExpiresIn: string;
|
||||
readonly clientOrigin: string;
|
||||
readonly clientOrigins: string[];
|
||||
readonly uploadDir: string;
|
||||
readonly maxUploadSize: number;
|
||||
readonly schedulerIntervalMs: number;
|
||||
@@ -105,6 +106,7 @@ export function loadEnv(): Env {
|
||||
jwtSecret: required('JWT_SECRET'),
|
||||
jwtExpiresIn: process.env.JWT_EXPIRES_IN ?? '7d',
|
||||
clientOrigin: process.env.CLIENT_ORIGIN ?? 'http://localhost:5173',
|
||||
clientOrigins: (process.env.CLIENT_ORIGIN ?? 'http://localhost:5173').split(',').map((s) => s.trim()),
|
||||
uploadDir,
|
||||
maxUploadSize: parseMaxUploadSize(process.env.MAX_UPLOAD_SIZE ?? String(20 * 1024 * 1024)),
|
||||
schedulerIntervalMs: Number.parseInt(process.env.SCHEDULER_INTERVAL_MS ?? '20000', 10),
|
||||
|
||||
Reference in New Issue
Block a user