You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
Revert to the old behaviour when ADMIN=false
This commit is contained in:
@@ -133,10 +133,12 @@ http {
|
||||
{% endif %}
|
||||
include /etc/nginx/proxy.conf;
|
||||
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
||||
auth_request /internal/auth/user;
|
||||
proxy_pass http://$webmail;
|
||||
{% if ADMIN == 'true' %}
|
||||
auth_request /internal/auth/user;
|
||||
error_page 403 @webmail_login;
|
||||
}
|
||||
|
||||
location {{ WEB_WEBMAIL }}/sso.php {
|
||||
{% if WEB_WEBMAIL != '/' %}
|
||||
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
||||
@@ -152,11 +154,13 @@ http {
|
||||
proxy_pass http://$webmail;
|
||||
error_page 403 @webmail_login;
|
||||
}
|
||||
|
||||
location @webmail_login {
|
||||
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
}
|
||||
{% endif %}{% endif %}
|
||||
{% if ADMIN == 'true' %}
|
||||
location {{ WEB_ADMIN }} {
|
||||
return 301 {{ WEB_ADMIN }}/ui;
|
||||
|
||||
@@ -7,9 +7,11 @@ attachment_size_limit = {{ MAX_FILESIZE }}
|
||||
allow_admin_panel = Off
|
||||
|
||||
[labs]
|
||||
allow_gravatar = Off
|
||||
{% if ADMIN == "true" %}
|
||||
custom_login_link='sso.php'
|
||||
custom_logout_link='{{ WEB_ADMIN }}/ui/logout'
|
||||
allow_gravatar = Off
|
||||
{% endif %}
|
||||
|
||||
[contacts]
|
||||
enable = On
|
||||
|
||||
@@ -17,8 +17,7 @@ $config['plugins'] = array(
|
||||
'markasjunk',
|
||||
'managesieve',
|
||||
'enigma',
|
||||
'carddav',
|
||||
'mailu'
|
||||
'carddav'
|
||||
);
|
||||
|
||||
$front = getenv('FRONT_ADDRESS') ? getenv('FRONT_ADDRESS') : 'front';
|
||||
@@ -37,8 +36,11 @@ $config['managesieve_host'] = $imap;
|
||||
$config['managesieve_usetls'] = false;
|
||||
|
||||
// Customization settings
|
||||
$config['support_url'] = getenv('WEB_ADMIN') ? '../..' . getenv('WEB_ADMIN') : '';
|
||||
$config['sso_logout_url'] = getenv('WEB_ADMIN').'/ui/logout';
|
||||
if (filter_var(getenv('ADMIN'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) {
|
||||
array_push($config['plugins'], 'mailu');
|
||||
$config['support_url'] = getenv('WEB_ADMIN') ? '../..' . getenv('WEB_ADMIN') : '';
|
||||
$config['sso_logout_url'] = getenv('WEB_ADMIN').'/ui/logout';
|
||||
}
|
||||
$config['product_name'] = 'Mailu Webmail';
|
||||
|
||||
// We access the IMAP and SMTP servers locally with internal names, SSL
|
||||
|
||||
Reference in New Issue
Block a user