[Web] CSS fixes; Add OAUTH2_FORGET_SESSION_AFTER_LOGIN to vars.inc.php (wip); Do not run initdb on non-master cow

This commit is contained in:
andryyy
2020-03-24 18:46:11 +01:00
parent f92a4a69b2
commit 7a4560ee28
6 changed files with 20 additions and 5 deletions

View File

@@ -12,6 +12,14 @@ function init_db_schema() {
if ($stmt->fetch(PDO::FETCH_ASSOC)['version'] == $db_version) {
return true;
}
if (!preg_match('/y|yes/i', getenv('MASTER'))) {
$_SESSION['return'][] = array(
'type' => 'warning',
'log' => array(__FUNCTION__),
'msg' => 'Database not initialized: not running db_init on slave.'
);
return true;
}
}
$views = array(

View File

@@ -3,6 +3,7 @@
// Slave does not serve UI
if (!preg_match('/y|yes/i', getenv('MASTER'))) {
header('Location: /SOGo', true, 307);
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';

View File

@@ -132,6 +132,8 @@ $ANONYMIZE_IPS = true;
// OAuth2 settings
$REFRESH_TOKEN_LIFETIME = 2678400;
$ACCESS_TOKEN_LIFETIME = 86400;
// Logout from mailcow after first OAuth2 session profile request
$OAUTH2_FORGET_SESSION_AFTER_LOGIN = false;
// MAILBOX_DEFAULT_ATTRIBUTES define default attributes for new mailboxes
// These settings will not change existing mailboxes
@@ -155,6 +157,8 @@ $MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification'] = 'hourly';
// Check dovecot.conf for further changes (e.g. shared namespace)
$MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format'] = 'maildir:';
// Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing
$RSPAMD_MAPS = array(
'regex' => array(