Fix Paperless login redirect issue

- Configure LOGIN_REDIRECT_URL and LOGOUT_REDIRECT_URL to /paperless/
- Set proper cookie paths for session isolation (/paperless/ instead of /)
- Use environment variables for redirect URLs in paperless_custom_settings.py
- Add PAPERLESS_URL and PAPERLESS_FORCE_SCRIPT_NAME to env template
- Ensure FORCE_SCRIPT_NAME respects environment variable

This fixes the issue where logging into Paperless redirects to the root Django
app instead of staying within the Paperless scope. The docker-compose.yml
already has the correct environment variables set.
This commit is contained in:
2025-10-05 20:57:06 +02:00
parent 544284dd8b
commit da66bd356e
2 changed files with 16 additions and 4 deletions

View File

@@ -42,6 +42,9 @@ PAPERLESS_SECRET_KEY=your_paperless_secret_key_here
PAPERLESS_ADMIN_USER=admin
PAPERLESS_ADMIN_PASSWORD=your_paperless_admin_password_here
PAPERLESS_ADMIN_MAIL=admin@vhtv-stiftung.de
# Paperless URL configuration for reverse proxy
PAPERLESS_URL=https://vhtv-stiftung.de/paperless
PAPERLESS_FORCE_SCRIPT_NAME=/paperless
# GRAMPS WEB CONFIGURATION
GRAMPSWEB_SECRET_KEY=your_grampsweb_secret_key_here