From 481fcfc8bd291c678d14b20c7c34a925503b8507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9D=89?= Date: Tue, 7 Apr 2020 22:06:22 +0800 Subject: file_server: use text/typescript instead of application/typescript (#4620) I just tried it and found that using application/typescript, the browser will download the file directly, I think that .ts should be mapped to application/javascript or text/typescript --- std/http/file_server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'std/http') diff --git a/std/http/file_server.ts b/std/http/file_server.ts index 79f3e5081..468e8a60e 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -47,10 +47,10 @@ const MEDIA_TYPES: Record = { ".json": "application/json", ".map": "application/json", ".txt": "text/plain", - ".ts": "application/typescript", - ".tsx": "application/typescript", + ".ts": "text/typescript", + ".tsx": "text/tsx", ".js": "application/javascript", - ".jsx": "application/jsx", + ".jsx": "text/jsx", ".gz": "application/gzip", }; -- cgit v1.2.3