You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
Make rainloop use internal auth
This commit is contained in:
@@ -133,7 +133,27 @@ 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;
|
||||
error_page 403 @webmail_login;
|
||||
}
|
||||
location {{ WEB_WEBMAIL }}/sso.php {
|
||||
{% if WEB_WEBMAIL != '/' %}
|
||||
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
||||
rewrite ^{{ WEB_WEBMAIL }}/(.*) /$1 break;
|
||||
{% endif %}
|
||||
include /etc/nginx/proxy.conf;
|
||||
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;
|
||||
proxy_set_header X-Remote-User $user;
|
||||
proxy_set_header X-Remote-User-Token $token;
|
||||
proxy_pass http://$webmail;
|
||||
error_page 403 @webmail_login;
|
||||
}
|
||||
location @webmail_login {
|
||||
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user