fix(csp): Allow cdn.jsdelivr.net for Swagger UI assets

Added cdn.jsdelivr.net to Content Security Policy directives to allow
Swagger UI assets (JavaScript, CSS, and images) to load properly.

Updated CSP directives:
- CSP_SCRIPT_SRC: Added cdn.jsdelivr.net for swagger-ui-bundle.js
- CSP_STYLE_SRC: Added cdn.jsdelivr.net for swagger-ui.css
- CSP_IMG_SRC: Added cdn.jsdelivr.net for favicon

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-01 03:56:05 -05:00
parent 7e151a23cc
commit 86cde135a9

View File

@@ -239,17 +239,20 @@ CSP_SCRIPT_SRC = (
"https://connect-js.stripe.com",
"https://www.googletagmanager.com",
"https://www.google-analytics.com",
"https://cdn.jsdelivr.net", # Required for Swagger UI
"blob:", # Required for Stripe
)
CSP_STYLE_SRC = (
"'self'",
"'unsafe-inline'", # Required for Stripe and many UI libraries
"https://cdn.jsdelivr.net", # Required for Swagger UI
)
CSP_IMG_SRC = (
"'self'",
"data:",
"https://*.stripe.com",
"https://www.google-analytics.com",
"https://cdn.jsdelivr.net", # Required for Swagger UI
)
CSP_CONNECT_SRC = (
"'self'",