mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 19:18:07 +00:00
Introduce AUTH_PROXY_LOGOUT_URL
This commit is contained in:
@@ -86,6 +86,7 @@ DEFAULT_CONFIG = {
|
||||
'PROXY_AUTH_WHITELIST': '',
|
||||
'PROXY_AUTH_HEADER': 'X-Auth-Email',
|
||||
'PROXY_AUTH_CREATE': False,
|
||||
'PROXY_AUTH_LOGOUT_URL': None,
|
||||
'SUBNET': '192.168.203.0/24',
|
||||
'SUBNET6': None,
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ def login():
|
||||
def logout():
|
||||
flask_login.logout_user()
|
||||
flask.session.destroy()
|
||||
response = flask.redirect(flask.url_for('.login'))
|
||||
response = flask.redirect(app.config('PROXY_AUTH_LOGOUT_URL') or flask.url_for('.login'))
|
||||
for cookie in ['roundcube_sessauth', 'roundcube_sessid', 'smsession']:
|
||||
response.set_cookie(cookie, 'empty', expires=0)
|
||||
return response
|
||||
|
||||
@@ -377,4 +377,6 @@ Use ``PROXY_AUTH_HEADER`` (default: 'X-Auth-Email') to customize which HTTP head
|
||||
|
||||
Once configured, any request to /sso/proxy will be redirected to the webmail and /sso/proxy/admin to the admin panel. Please check issue `1972` for more details.
|
||||
|
||||
Use ``PROXY_AUTH_LOGOUT_URL`` (default: unset) to redirect users to a specific URL after they have been logged out.
|
||||
|
||||
.. _`1972`: https://github.com/Mailu/Mailu/issues/1972
|
||||
|
||||
2
towncrier/newsfragments/2692.misc
Normal file
2
towncrier/newsfragments/2692.misc
Normal file
@@ -0,0 +1,2 @@
|
||||
Make the login page "guess" where the user wants to land using the Referer header
|
||||
Introduce AUTH_PROXY_LOGOUT_URL to redirect users to a specific URL after they have been logged-out
|
||||
Reference in New Issue
Block a user