From ef4bc87383c6f7e10f285131591ff996869db76d Mon Sep 17 00:00:00 2001 From: retoor Date: Mon, 27 Jan 2025 23:56:59 +0100 Subject: [PATCH] Content type --- src/app/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/app.py b/src/app/app.py index e6f953a..e16a279 100644 --- a/src/app/app.py +++ b/src/app/app.py @@ -127,8 +127,10 @@ class BaseApplication(RPCApplication): return await handler(request) async def render_template(self, name, request=None, context=None): - return aiohttp_jinja2.render_template(name, request, context) - + response = aiohttp_jinja2.render_template(name, request, context) + response.headers['Content-Type'] = 'text/html' + return response + @web.middleware async def request_middleware(self, request: web.Request, handler): time_start = time.time()