Skip to content

Commit 0a2742c

Browse files
authored
Fixed mimetype being wrong in winreg (#8316)
2 parents f8de087 + 6486aeb commit 0a2742c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tribler/core/restapi/webui_endpoint.py

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ async def return_files(self, request: web.Request) -> RESTResponse | web.FileRes
4242
response = web.FileResponse(resource)
4343
if path.endswith(".tsx"):
4444
response.content_type = "application/javascript"
45+
elif path.endswith(".js"):
46+
# https://github.com/Tribler/tribler/issues/8279
47+
response.content_type = "application/javascript"
48+
elif path.endswith(".html"):
49+
response.content_type = "text/html"
4550
elif (guessed_type := mimetypes.guess_type(path)[0]) is not None:
4651
response.content_type = guessed_type
4752
else:

0 commit comments

Comments
 (0)