From 1d7df13c943cc9138dc3ed514f9ab81d861bfbac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:50:11 +0000 Subject: [PATCH] feat(ui): migrate Tailwind CSS from v2 CDN to v3 Play CDN (interim step) Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/85d2244d-170a-48d3-8f6b-b4c124a49ed9 --- app/config.py | 2 +- docs/ConfigurationGuide.md | 2 +- docs/ProductionReadiness.md | 4 ++-- frontend/templates/base.html | 9 +++++++-- frontend/templates/billing_success.html | 2 +- frontend/templates/forgot_password.html | 2 +- frontend/templates/forgot_username.html | 2 +- frontend/templates/login.html | 2 +- frontend/templates/password_reset_form.html | 2 +- frontend/templates/shared_link_view.html | 4 ++-- frontend/templates/signup.html | 2 +- frontend/templates/verify_email_sent.html | 2 +- 12 files changed, 20 insertions(+), 15 deletions(-) diff --git a/app/config.py b/app/config.py index 85631fb8..20440603 100644 --- a/app/config.py +++ b/app/config.py @@ -1146,7 +1146,7 @@ class Settings(BaseSettings): security_header_csp_enabled: bool = Field(default=True, description="Enable CSP header.") security_header_csp_value: str = Field( default=( - "default-src 'self'; script-src 'self' 'unsafe-inline';" + "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com;" " style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;" ), description="CSP header value. Customize based on your application's resource loading needs.", diff --git a/docs/ConfigurationGuide.md b/docs/ConfigurationGuide.md index 5dc47650..b2f7ddd8 100644 --- a/docs/ConfigurationGuide.md +++ b/docs/ConfigurationGuide.md @@ -792,7 +792,7 @@ SECURITY_HEADER_CSP_VALUE="default-src 'self'; script-src 'self'; style-src 'sel SECURITY_HEADER_CSP_VALUE="default-src 'self'; script-src 'self' https://cdn.example.com; style-src 'self' 'unsafe-inline';" ``` -**Note:** The default policy includes `'unsafe-inline'` for compatibility with Tailwind CSS and inline JavaScript. For stricter security, use nonces or hashes. +**Note:** The default policy includes `'unsafe-inline'` and `https://cdn.tailwindcss.com` for compatibility with Tailwind CSS v3 Play CDN and inline JavaScript. For stricter security, use nonces or hashes. #### X-Frame-Options diff --git a/docs/ProductionReadiness.md b/docs/ProductionReadiness.md index a938e39e..fd0f3cc7 100644 --- a/docs/ProductionReadiness.md +++ b/docs/ProductionReadiness.md @@ -157,10 +157,10 @@ Recommended headers to configure at the proxy level: #### Content-Security-Policy Notes -DocuElevate's frontend uses Tailwind CSS loaded from CDN in development mode. In production, ensure your CSP allows loading scripts and styles from your configured static file origin. A starting point: +DocuElevate's frontend uses Tailwind CSS v3 Play CDN. In production, ensure your CSP allows loading scripts from `https://cdn.tailwindcss.com`. A starting point: ``` -Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; +Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; ``` Audit and tighten this policy for your specific deployment. diff --git a/frontend/templates/base.html b/frontend/templates/base.html index bf4506b4..6f4a9dbf 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -21,8 +21,13 @@ {% block head_css %} - - + + + {{ _("billing.success_page_title") }} - + diff --git a/frontend/templates/forgot_password.html b/frontend/templates/forgot_password.html index 148f01fe..961c3d21 100644 --- a/frontend/templates/forgot_password.html +++ b/frontend/templates/forgot_password.html @@ -4,7 +4,7 @@ DocuElevate - Forgot Password - + diff --git a/frontend/templates/forgot_username.html b/frontend/templates/forgot_username.html index c8c9b8d2..2007e8a9 100644 --- a/frontend/templates/forgot_username.html +++ b/frontend/templates/forgot_username.html @@ -4,7 +4,7 @@ DocuElevate - Forgot Username - + diff --git a/frontend/templates/login.html b/frontend/templates/login.html index 7476c6f3..2cf9a0d6 100644 --- a/frontend/templates/login.html +++ b/frontend/templates/login.html @@ -4,7 +4,7 @@ {{ _("app.name") }} - {{ _("auth.login_title") }} - + diff --git a/frontend/templates/password_reset_form.html b/frontend/templates/password_reset_form.html index 217ec2b6..f57d3b1b 100644 --- a/frontend/templates/password_reset_form.html +++ b/frontend/templates/password_reset_form.html @@ -4,7 +4,7 @@ DocuElevate - Reset Password - + diff --git a/frontend/templates/shared_link_view.html b/frontend/templates/shared_link_view.html index e9e94cd7..010f8b6c 100644 --- a/frontend/templates/shared_link_view.html +++ b/frontend/templates/shared_link_view.html @@ -4,8 +4,8 @@ Shared Document – DocuElevate - - + + DocuElevate - Create Account - + diff --git a/frontend/templates/verify_email_sent.html b/frontend/templates/verify_email_sent.html index ffb3a960..3835a920 100644 --- a/frontend/templates/verify_email_sent.html +++ b/frontend/templates/verify_email_sent.html @@ -4,7 +4,7 @@ {{ _("auth.verify_email_page_title") }} - +