Fixed two critical session-related issues: 1. Session expiration during file processing - Added proper error message when session expires mid-process - Prevents silent failure and missing download buttons - Shows clear "Session expired" message to user 2. Session lifetime and cookie configuration - Increased session lifetime from 24 hours to 7 days (configurable) - Made sessions permanent (session.permanent = True) in all login flows - Improved cookie security settings with environment variable control - Added SESSION_COOKIE_SECURE and SESSION_LIFETIME_DAYS env vars - Fixed cookie configuration for HTTPS reverse proxy Changes: - web_app.py: Enhanced session configuration and made sessions permanent - templates/index.html: Better error handling for session expiration This fixes: - "Unexpected token '<'" errors appearing intermittently - Missing download buttons after metadata update - Sessions expiring too quickly requiring frequent re-login Environment variables (optional): - SESSION_COOKIE_SECURE=true (default for HTTPS) - SESSION_LIFETIME_DAYS=7 (default 7 days) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.html | ||
| login.html | ||
| oauth_callback.html | ||