Commit graph

3 commits

Author SHA1 Message Date
Kumi 742ec4668e
Refactor Caddyfile routing directives
Simplified the routing and handling directives in the Caddyfile by removing explicit regular expressions for HTML files and reorganizing asset handling. All requests are now served with a more generalized approach, improving readability and potential maintainability of the server configuration. This change encapsulates asset file serving and reverse proxying under specific handles, ensuring a cleaner and more structured configuration.
2023-12-31 14:37:59 +01:00
Kumi 9c32a783c9
Switch Caddy reverse_proxy to Unix socket for HTML
Changed the HTML reverse proxy in the Caddy server configuration to use a Unix socket connection. This enhances security and performance by avoiding TCP stack overhead and protects against network-based attacks targeting the application server interface. This should only affect internal communication with the uWSGI server.
2023-12-31 14:00:51 +01:00
Kumi 193546fcde
Implement dynamic service rendering with Flask
Refactored the website to serve dynamic content using Flask, replacing static HTML pages. This allows for the centralized management of service data through a JSON file. Optimizations include:

- Added a .gitignore file to exclude Python and Flask-specific temporary files.
- Migrated static assets into an organized directory structure to facilitate Flask's static file serving.
- Removed redundant HTML files and created Flask template versions with dynamic content rendering.
- Introduced Caddy server configuration for the new Flask architecture, including headers for security and CORS policy, and reverse proxy settings for route handling.

With these changes, website maintenance and updates are simplified, allowing for service information to be updated in a single location (`services.json`), which then propagates to the user-facing pages automatically.
2023-12-31 13:59:13 +01:00