Commit Graph

6 Commits

Author SHA1 Message Date
ske087 57b7810069 Fix 404 on the header logo caused by an encoded query string
base.html passed the cache-busting query string INSIDE the filename argument:

    url_for('static', filename='uploads/header_logo.png?v=1')

Flask percent-encodes the '?' to '%3F', producing a request for a file
literally named "header_logo.png%3Fv=1", which does not exist. Every
authenticated page therefore logged:

    GET /static/uploads/header_logo.png%3Fv=1 404

The logo silently stayed hidden too, because the element carries
onerror="this.style.display='none'".

Changes:
- base.html / login.html: append "?v=..." OUTSIDE url_for(), matching what
  admin/customize_logos.html already did correctly.
- Inject logo_version from a context processor instead of hardcoding it.
  It is derived from the newest logo's mtime, so uploading a new logo in
  Admin -> Customize Logos is reflected immediately. The previous value was
  a literal 1, which defeated cache-busting entirely; login.html used
  range(1, 999999) | random, which changed on every request and made the
  logo uncacheable.

Verified: /, /content/ and /players/ now render
/static/uploads/header_logo.png?v=<mtime> (HTTP 200), and no %3F requests
appear in the logs.
2026-09-11 13:18:29 +03:00
Quality App Developer a4262da7c9 chore: fix file permissions and ownership across project
- Changed ownership of all files to scheianu:scheianu
- Set directories to 755 permissions (rwxr-xr-x)
- Set files to 644 permissions (rw-r--r--)
- Made shell scripts executable (755)
- Allows development without requiring sudo for file modifications
- Improves development workflow and security
2026-01-15 22:39:51 +02:00
Quality App Developer 48f1bfbcad Add HTTPS configuration management system
- Add HTTPSConfig model for managing HTTPS settings
- Add admin routes for HTTPS configuration management
- Add beautiful admin template for HTTPS configuration
- Add database migration for https_config table
- Add CLI utility for HTTPS management
- Add setup script for automated configuration
- Add Caddy configuration generator and manager
- Add comprehensive documentation (3 guides)
- Add HTTPS Configuration card to admin dashboard
- Implement input validation and security features
- Add admin-only access control with audit trail
- Add real-time configuration preview
- Integrate with existing Caddy reverse proxy

Features:
- Enable/disable HTTPS from web interface
- Configure domain, hostname, IP address, port
- Automatic SSL certificate management via Let's Encrypt
- Real-time Caddyfile generation and reload
- Full audit trail with admin username and timestamps
- Support for HTTPS and HTTP fallback access points
- Beautiful, mobile-responsive UI

Modified files:
- app/models/__init__.py (added HTTPSConfig import)
- app/blueprints/admin.py (added HTTPS routes)
- app/templates/admin/admin.html (added HTTPS card)
- docker-compose.yml (added Caddyfile mount and admin port)

New files:
- app/models/https_config.py
- app/blueprints/https_config.html
- app/utils/caddy_manager.py
- https_manager.py
- setup_https.sh
- migrations/add_https_config_table.py
- migrations/add_email_to_https_config.py
- HTTPS_STATUS.txt
- Documentation files (3 markdown guides)
2026-01-14 12:02:49 +02:00
DigiServer Developer 4d411b645d fixed login 2025-11-17 23:12:53 +02:00
DigiServer Developer 6d44542765 login logo 2025-11-17 22:32:37 +02:00
ske087 e5a00d19a5 updated digiserver 2 2025-11-12 16:07:03 +02:00