|
|
|
@ -146,6 +146,12 @@ http {
|
|
|
|
|
rewrite /sso/static/(.*) /static/$1 permanent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ {{ WEB_WEBMAIL }}/sso/ui/logout {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite ^{{ WEB_WEBMAIL }}/sso/ui/logout$ /sso/logout break;
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ /ui/language {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_set_header X-Forwarded-Prefix {{ WEB_ADMIN }};
|
|
|
|
@ -183,11 +189,12 @@ http {
|
|
|
|
|
rewrite ^{{ WEB_WEBMAIL }}/(.*) /$1 break;
|
|
|
|
|
{% endif %}
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
|
|
|
|
auth_request /internal/auth/user;
|
|
|
|
|
auth_request_set $user $upstream_http_x_user;
|
|
|
|
|
auth_request_set $token $upstream_http_x_user_token;
|
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location {{ WEB_WEBMAIL }}/sso.php {
|
|
|
|
@ -202,16 +209,16 @@ http {
|
|
|
|
|
auth_request_set $token $upstream_http_x_user_token;
|
|
|
|
|
proxy_set_header X-Remote-User $user;
|
|
|
|
|
proxy_set_header X-Remote-User-Token $token;
|
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location @webmail_login {
|
|
|
|
|
return 302 {{ WEB_ADMIN }}/sso/login?next=ui.webmail;
|
|
|
|
|
location @webmail_login {
|
|
|
|
|
return 302 /sso/login?next=ui.webmail;
|
|
|
|
|
}
|
|
|
|
|
{% else %}
|
|
|
|
|
}
|
|
|
|
|
{% endif %}{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
|
location {{ WEB_ADMIN }} {
|
|
|
|
|
return 301 {{ WEB_ADMIN }}/ui;
|
|
|
|
|