Fix: respect subpath in logout, share link and auto-login redirects (#14476)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-10-18 14:28:15 +00:00
1 parent 961f7fd672
commit 309a4b004d
8 files changed
+106 -7

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ logger = logging.getLogger("paperless.auth")
class AutoLoginMiddleware(MiddlewareMixin):
def process_request(self, request: HttpRequest) -> None:
# Dont use auto-login with token request
if request.path.startswith("/api/token/") and request.method == "POST":
if request.path_info.startswith("/api/token/") and request.method == "POST":
return None
try:
request.user = User.objects.get(