From ee5265f4dddf921c6e999a0d3a22170cf547d3e2 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 29 Aug 2022 09:09:28 +0200 Subject: [PATCH] Small tweaks/typos --- app/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index 22d90e1..007145b 100644 --- a/app/main.py +++ b/app/main.py @@ -135,9 +135,7 @@ class CustomMiddleware: "content-security-policy" ] = "default-src 'self'; style-src 'self' 'unsafe-inline';" if not DEBUG: - headers[ - "strict-transport-security" - ] = "max-age=63072000; includeSubdomains" + headers["strict-transport-security"] = "max-age=63072000;" await send(message) # type: ignore @@ -220,7 +218,7 @@ async def custom_http_exception_handler( title = ( { 404: "Oops, nothing to see here", - 500: "Opps, somethine went wrong", + 500: "Oops, something went wrong", } ).get(exc.status_code, exc.detail) try: @@ -1103,6 +1101,7 @@ async def serve_attachment( return FileResponse( UPLOAD_DIR / content_hash, media_type=upload.content_type, + headers={"Cache-Control": "max-age=31536000"}, )