u
This commit is contained in:
@@ -12,5 +12,7 @@ export async function respondWithAuthenticatedUser(res, status, body) {
|
||||
...body,
|
||||
googleClientId: env.googleClientId,
|
||||
schemaVersion,
|
||||
vhost: env.vhost,
|
||||
vhostSettings: env.vhostSettings,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -36,6 +36,12 @@ export function register(app, basePath = '') {
|
||||
* schemaVersion:
|
||||
* type: integer
|
||||
* description: Current database schema version
|
||||
* vhost:
|
||||
* type: boolean
|
||||
* description: True when running in Docker (client may change feature set)
|
||||
* vhostSettings:
|
||||
* type: string
|
||||
* description: Pipelined settings string from VHOST_SETTINGS env
|
||||
* 401:
|
||||
* description: Unauthorized — still includes `googleClientId` and `schemaVersion` for the frontend
|
||||
* content:
|
||||
@@ -50,6 +56,12 @@ export function register(app, basePath = '') {
|
||||
* schemaVersion:
|
||||
* type: integer
|
||||
* description: Current database schema version
|
||||
* vhost:
|
||||
* type: boolean
|
||||
* description: True when running in Docker (client may change feature set)
|
||||
* vhostSettings:
|
||||
* type: string
|
||||
* description: Pipelined settings string from VHOST_SETTINGS env
|
||||
*/
|
||||
app.get(`${basePath}/auth/me`, async (req, res) => {
|
||||
try {
|
||||
|
||||
@@ -12,7 +12,12 @@ function parseHttpsPort(val) {
|
||||
return Number.isInteger(n) && n > 0 ? n : 8443;
|
||||
}
|
||||
|
||||
const isDocker = process.env.RUNNING_IN_DOCKER === 'true';
|
||||
|
||||
export default {
|
||||
isDocker,
|
||||
vhost: isDocker,
|
||||
vhostSettings: process.env.VHOST_SETTINGS || '',
|
||||
host: process.env.HOST || '127.0.0.1',
|
||||
port: Number(process.env.PORT) || 4208,
|
||||
httpsPort: parseHttpsPort(process.env.HTTPS_PORT),
|
||||
@@ -50,7 +55,7 @@ export default {
|
||||
storageDir: process.env.STORAGE_DIR || resolve(__dirname, '../../data/storage'),
|
||||
},
|
||||
backup: {
|
||||
enabled: process.env.BACKUP_ENABLED !== 'false',
|
||||
enabled: !isDocker && process.env.BACKUP_ENABLED !== 'false',
|
||||
dir: process.env.BACKUP_DIR ? resolve(process.env.BACKUP_DIR) : resolve(__dirname, '../../data/backups'),
|
||||
intervalMs: Number(process.env.BACKUP_INTERVAL_MS) || 60 * 60 * 1000,
|
||||
hourlyRetentionCount: Number(process.env.BACKUP_HOURLY_RETENTION) || 50,
|
||||
@@ -65,7 +70,7 @@ export default {
|
||||
key: process.env.REDIS_KEY || process.env.REDIS_HEALTH_KEY || 'healthcheck:latency_ms',
|
||||
},
|
||||
healthMonitor: {
|
||||
enabled: process.env.HEALTH_MONITOR_ENABLED !== 'false',
|
||||
enabled: !isDocker && process.env.HEALTH_MONITOR_ENABLED !== 'false',
|
||||
intervalMs: Number(process.env.HEALTH_MONITOR_INTERVAL_MS) || 60_000,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user