LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
[FIX] Frontend CSP: add unsafe-eval for RJSF and blob: for PDF viewer (#1875)
vishnuszipstackd84b7241ffdf
diff --git a/frontend/nginx.conf b/frontend/nginx.confindex 4e13fb122..ab140947b 100644--- a/frontend/nginx.conf+++ b/frontend/nginx.conf@@ -49,11 +49,13 @@ http {# Content Security Policy (single quoted string required by nginx add_header)# - 'unsafe-inline' in script-src: required for runtime-config.js injected at container start+ # - 'unsafe-eval' in script-src: required by RJSF (React JSON Schema Form) which uses new Function()# - 'unsafe-inline' in style-src: required by Ant Design CSS-in-JS+ # - blob: in connect-src: required by PDF.js viewer for blob: URL document loading# - cdn.jsdelivr.net: Monaco Editor loads from this CDN# - unpkg.com: PDF.js worker# - PostHog, GTM, reCAPTCHA, Stripe, Product Fruits: third-party services- add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://unpkg.com https://eu.i.posthog.com https://eu-assets.i.posthog.com https://www.googletagmanager.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://js.stripe.com https://app.productfruits.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://eu.i.posthog.com https://eu-assets.i.posthog.com; font-src 'self' data:; connect-src 'self' wss: https://eu.i.posthog.com https://eu-assets.i.posthog.com https://www.google-analytics.com https://api.stripe.com https://app.productfruits.com; frame-src 'self' https://www.google.com/recaptcha/ https://recaptcha.google.com https://js.stripe.com https://hooks.stripe.com; worker-src 'self' blob: https://unpkg.com https://cdn.jsdelivr.net; object-src 'none'; base-uri 'self'; form-action 'self' https://checkout.stripe.com; frame-ancestors 'self'" always;+ add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net https://unpkg.com https://eu.i.posthog.com https://eu-assets.i.posthog.com https://www.googletagmanager.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://js.stripe.com https://app.productfruits.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://eu.i.posthog.com https://eu-assets.i.posthog.com; font-src 'self' data:; connect-src 'self' blob: wss: https://eu.i.posthog.com https://eu-assets.i.posthog.com https://www.google-analytics.com https://api.stripe.com https://app.productfruits.com; frame-src 'self' https://www.google.com/recaptcha/ https://recaptcha.google.com https://js.stripe.com https://hooks.stripe.com; worker-src 'self' blob: https://unpkg.com https://cdn.jsdelivr.net; object-src 'none'; base-uri 'self'; form-action 'self' https://checkout.stripe.com; frame-ancestors 'self'" always;# Disable TRACE and TRACK methodsif ($request_method ~ ^(TRACE|TRACK)$) {