From 10b9b1b7cfbd55da023c0049f3814454b4bb92aa Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 4 Apr 2026 01:56:53 +0200 Subject: [PATCH] Rebrand to PedsHub, fix CSP for fonts and Turnstile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - index.html: title โ†’ PedsHub, icon โ†’ ๐Ÿฅ, add meta description - nginx.conf: CSP extended for Google Fonts, Cloudflare Turnstile (script/connect/frame/img) - Navbar, LoginPage, ForgotPassword, ResetPassword, email_service, main.py: PedQuiz โ†’ PedsHub, ๐Ÿฉบ โ†’ ๐Ÿฅ Co-Authored-By: Claude Sonnet 4.6 --- backend/app/main.py | 2 +- backend/app/services/email_service.py | 12 ++++++------ frontend/index.html | 5 +++-- frontend/nginx.conf | 2 +- frontend/src/components/Navbar.jsx | 2 +- frontend/src/pages/ForgotPasswordPage.jsx | 2 +- frontend/src/pages/ResetPasswordPage.jsx | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index da291d3..daff60f 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -311,7 +311,7 @@ async def lifespan(app: FastAPI): app = FastAPI( - title="PedQuiz", + title="PedsHub", description="Pediatric Knowledge Quiz Platform", version="2.0.0", lifespan=lifespan, diff --git a/backend/app/services/email_service.py b/backend/app/services/email_service.py index ecb7d12..3ba6d6e 100644 --- a/backend/app/services/email_service.py +++ b/backend/app/services/email_service.py @@ -14,7 +14,7 @@ def get_mail_config() -> ConnectionConfig: MAIL_USERNAME=settings.MAIL_USERNAME, MAIL_PASSWORD=settings.MAIL_PASSWORD, MAIL_FROM=settings.MAIL_FROM, - MAIL_FROM_NAME="PedQuiz", + MAIL_FROM_NAME="PedsHub", MAIL_PORT=settings.MAIL_PORT, MAIL_SERVER=settings.MAIL_SERVER, MAIL_STARTTLS=settings.MAIL_STARTTLS, @@ -73,7 +73,7 @@ def _wrap(subject: str, body_md: str) -> str: - ๐Ÿฉบ PedQuiz + ๐Ÿฅ PedsHub @@ -84,7 +84,7 @@ def _wrap(subject: str, body_md: str) -> str:

- PedQuiz ยท Pediatric Knowledge Platform
+ PedsHub ยท Pediatric Knowledge Platform
{settings.APP_URL}

@@ -112,12 +112,12 @@ async def _send(to_email: str, subject: str, html: str): async def send_verification_email(to_email: str, name: str, token: str): url = f"{settings.APP_URL}/verify-email?token={token}" - subject = "Verify your PedQuiz email" + subject = "Verify your PedsHub email" md = f"""# Verify your email Hi **{name}**, -Welcome to PedQuiz. Click below to verify your email address and activate your account. +Welcome to PedsHub. Click below to verify your email address and activate your account. [button:Verify Email Address]({url}) @@ -132,7 +132,7 @@ Welcome to PedQuiz. Click below to verify your email address and activate your a async def send_password_reset_email(to_email: str, name: str, token: str): url = f"{settings.APP_URL}/reset-password?token={token}" - subject = "Reset your PedQuiz password" + subject = "Reset your PedsHub password" md = f"""# Reset your password Hi **{name}**, diff --git a/frontend/index.html b/frontend/index.html index df9e727..69d2545 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,8 +3,9 @@ - PedQuiz - + PedsHub + + diff --git a/frontend/nginx.conf b/frontend/nginx.conf index a509b60..f3a83be 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -16,7 +16,7 @@ server { add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; media-src 'self' blob:; connect-src 'self'; font-src 'self';" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https://challenges.cloudflare.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://challenges.cloudflare.com; media-src 'self' blob:; connect-src 'self' https://challenges.cloudflare.com; font-src 'self' https://fonts.gstatic.com; frame-src https://challenges.cloudflare.com;" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; # API proxy to backend diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index fb1d64a..e475494 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -99,7 +99,7 @@ export default function Navbar() { return (

- setMenuOpen(false)}>๐Ÿฉบ PedQuiz + setMenuOpen(false)}>๐Ÿฅ PedsHub {user && ( <> diff --git a/frontend/src/pages/ForgotPasswordPage.jsx b/frontend/src/pages/ForgotPasswordPage.jsx index cd31754..90ed074 100644 --- a/frontend/src/pages/ForgotPasswordPage.jsx +++ b/frontend/src/pages/ForgotPasswordPage.jsx @@ -30,7 +30,7 @@ export default function ForgotPasswordPage() {
-
๐Ÿฉบ PedQuiz
+
๐Ÿฅ PedsHub
{sent ? ( diff --git a/frontend/src/pages/ResetPasswordPage.jsx b/frontend/src/pages/ResetPasswordPage.jsx index f1fbe25..8010263 100644 --- a/frontend/src/pages/ResetPasswordPage.jsx +++ b/frontend/src/pages/ResetPasswordPage.jsx @@ -33,7 +33,7 @@ export default function ResetPasswordPage() {
-
๐Ÿฉบ PedQuiz
+
๐Ÿฅ PedsHub
{success ? (