mirror of
https://github.com/optim-enterprises-bv/Mailu-OIDC.git
synced 2025-11-03 03:27:59 +00:00
Introduce AUTH_PROXY_LOGOUT_URL
This commit is contained in:
@@ -86,6 +86,7 @@ DEFAULT_CONFIG = {
|
|||||||
'PROXY_AUTH_WHITELIST': '',
|
'PROXY_AUTH_WHITELIST': '',
|
||||||
'PROXY_AUTH_HEADER': 'X-Auth-Email',
|
'PROXY_AUTH_HEADER': 'X-Auth-Email',
|
||||||
'PROXY_AUTH_CREATE': False,
|
'PROXY_AUTH_CREATE': False,
|
||||||
|
'PROXY_AUTH_LOGOUT_URL': None,
|
||||||
'SUBNET': '192.168.203.0/24',
|
'SUBNET': '192.168.203.0/24',
|
||||||
'SUBNET6': None,
|
'SUBNET6': None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ def login():
|
|||||||
def logout():
|
def logout():
|
||||||
flask_login.logout_user()
|
flask_login.logout_user()
|
||||||
flask.session.destroy()
|
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']:
|
for cookie in ['roundcube_sessauth', 'roundcube_sessid', 'smsession']:
|
||||||
response.set_cookie(cookie, 'empty', expires=0)
|
response.set_cookie(cookie, 'empty', expires=0)
|
||||||
return response
|
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.
|
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
|
.. _`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