Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit d656de8

Browse files
authored
Merge pull request #1258 from tribut/logout-url
Add PAPERLESS_LOGOUT_REDIRECT_URL
2 parents 32f0eba + bf2cdae commit d656de8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/configuration.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ PAPERLESS_HTTP_REMOTE_USER_HEADER_NAME=<str>
233233

234234
Defaults to `HTTP_REMOTE_USER`.
235235

236+
PAPERLESS_LOGOUT_REDIRECT_URL=<str>
237+
URL to redirect the user to after a logout. This can be used together with
238+
`PAPERLESS_ENABLE_HTTP_REMOTE_USER` to redirect the user back to the SSO
239+
application's logout page.
240+
241+
Defaults to None, which disables this feature.
242+
236243
.. _configuration-ocr:
237244

238245
OCR settings

src/paperless/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def __get_boolean(key, default="NO"):
144144
FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")
145145
BASE_URL = (FORCE_SCRIPT_NAME or "") + "/"
146146
LOGIN_URL = BASE_URL + "accounts/login/"
147+
LOGOUT_REDIRECT_URL = os.getenv("PAPERLESS_LOGOUT_REDIRECT_URL")
147148

148149
WSGI_APPLICATION = 'paperless.wsgi.application'
149150
ASGI_APPLICATION = "paperless.asgi.application"

0 commit comments

Comments
 (0)