Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c086fa4260 | |||
| be700fefc3 |
@@ -92,12 +92,13 @@ async def cache_control_middleware(request: Request, call_next):
|
|||||||
if request.url.path.startswith("/api/") or request.url.path in ("/", "/index.html"):
|
if request.url.path.startswith("/api/") or request.url.path in ("/", "/index.html"):
|
||||||
response.headers["Content-Security-Policy"] = (
|
response.headers["Content-Security-Policy"] = (
|
||||||
"default-src 'self'; "
|
"default-src 'self'; "
|
||||||
"script-src 'self' 'unsafe-inline' cdn.jsdelivr.net alcdn.msauth.net; "
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval' cdn.jsdelivr.net alcdn.msauth.net; "
|
||||||
"style-src 'self' 'unsafe-inline'; "
|
"style-src 'self' 'unsafe-inline'; "
|
||||||
"connect-src 'self' https://login.microsoftonline.com; "
|
"connect-src 'self' https://login.microsoftonline.com; "
|
||||||
"frame-src 'self' https://login.microsoftonline.com; "
|
"frame-src 'self' https://login.microsoftonline.com; "
|
||||||
"form-action 'self' https://login.microsoftonline.com; "
|
"form-action 'self' https://login.microsoftonline.com; "
|
||||||
"img-src 'self' data:;"
|
"img-src 'self' data:; "
|
||||||
|
"font-src 'self' data:;"
|
||||||
)
|
)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user