Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render

This commit is contained in:
2026-06-04 07:52:57 +02:00
parent 0b33a1b074
commit 15870ddb1f
191 changed files with 15453 additions and 1786 deletions

View File

@@ -0,0 +1,12 @@
from __future__ import annotations
from fastapi import HTTPException, Request, status
def verify_bearer_token(request: Request) -> None:
settings = request.app.state.settings
authorization = request.headers.get("Authorization", "")
scheme, _, token = authorization.partition(" ")
if scheme.lower() != "bearer" or token != settings.token:
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Unauthorized")