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