mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Small tweaks/typos
This commit is contained in:
parent
727eaa9ee1
commit
ee5265f4dd
1 changed files with 3 additions and 4 deletions
|
@ -135,9 +135,7 @@ class CustomMiddleware:
|
||||||
"content-security-policy"
|
"content-security-policy"
|
||||||
] = "default-src 'self'; style-src 'self' 'unsafe-inline';"
|
] = "default-src 'self'; style-src 'self' 'unsafe-inline';"
|
||||||
if not DEBUG:
|
if not DEBUG:
|
||||||
headers[
|
headers["strict-transport-security"] = "max-age=63072000;"
|
||||||
"strict-transport-security"
|
|
||||||
] = "max-age=63072000; includeSubdomains"
|
|
||||||
|
|
||||||
await send(message) # type: ignore
|
await send(message) # type: ignore
|
||||||
|
|
||||||
|
@ -220,7 +218,7 @@ async def custom_http_exception_handler(
|
||||||
title = (
|
title = (
|
||||||
{
|
{
|
||||||
404: "Oops, nothing to see here",
|
404: "Oops, nothing to see here",
|
||||||
500: "Opps, somethine went wrong",
|
500: "Oops, something went wrong",
|
||||||
}
|
}
|
||||||
).get(exc.status_code, exc.detail)
|
).get(exc.status_code, exc.detail)
|
||||||
try:
|
try:
|
||||||
|
@ -1103,6 +1101,7 @@ async def serve_attachment(
|
||||||
return FileResponse(
|
return FileResponse(
|
||||||
UPLOAD_DIR / content_hash,
|
UPLOAD_DIR / content_hash,
|
||||||
media_type=upload.content_type,
|
media_type=upload.content_type,
|
||||||
|
headers={"Cache-Control": "max-age=31536000"},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue