Password Policy/App rename/PM Scheduling Improvements

This commit is contained in:
2026-06-06 02:32:47 -05:00
parent dfd999b6a9
commit f024286b5e
59 changed files with 3814 additions and 299 deletions

View File

@@ -12,7 +12,7 @@ function isLocalDevOrigin(origin) {
function createCorsMiddleware() {
const persistedCors = one('SELECT value FROM app_settings WHERE key = ?', ['cors_allowed_domains'])?.value || '';
const allowedOrigins = (process.env.MIXEDASSETS_CORS_ORIGINS || persistedCors || 'http://localhost:5173,http://127.0.0.1:5173')
const allowedOrigins = (process.env.DEPRECORE_CORS_ORIGINS || persistedCors || 'http://localhost:5173,http://127.0.0.1:5173')
.split(',')
.map((origin) => origin.trim())
.filter(Boolean);
@@ -20,7 +20,7 @@ function createCorsMiddleware() {
return cors({
origin(origin, callback) {
if (!origin || allowedOrigins.includes(origin) || isLocalDevOrigin(origin)) return callback(null, true);
return callback(new Error('Origin is not allowed by MixedAssets CORS settings'));
return callback(new Error('Origin is not allowed by DepreCore CORS settings'));
},
credentials: true
});