INNER CODE UNIT · Python
dispatch
Nuclear-Marmalade/dataforge · forge/dashboard/app.py:32
async def dispatch(self, request, call_next):
response = await call_next(request)
response.headers["Content-Security-Policy"] = (
"default-src 'self'; script-src 'self' https://cdn.tailwindcss.com https://unpkg.com; style-src 'self' 'unsafe-inline'"
)
response.headers["X-Content-Type-Options"] = "nosniff"
return response
app.add_middleware(CSPMiddleware)
_HERE = Path(__file__).parent
templates = Jinja2Templates(directory=str(_HERE / "templates"))
app.mount("/static", StaticFiles(directory=str(_HERE / "static")), name="static")
# ── Industry whitelist (matches enrichment/pipeline.py) ────────────────────
INDUSTRY_WHITELIST = [