- 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.
- Added configurable SESSION_COOKIE_NAME and CSRF_COOKIE_NAME to Django settings
- Main app now uses 'stiftung_sessionid' instead of default 'sessionid'
- Paperless continues using default 'sessionid' for separation
- All configuration centralized in .env files as requested
- Updated both development and production compose configurations
- Added session settings to env templates for easy deployment
This resolves the session conflict where logging into one app would
kick out sessions from the other app. Both applications now maintain
independent login sessions.