diff options
author | 木杉 <zhmushan@qq.com> | 2020-04-07 22:06:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 10:06:22 -0400 |
commit | 481fcfc8bd291c678d14b20c7c34a925503b8507 (patch) | |
tree | a6b3e8073247b55c6b5f3320a92a166a9b1ce3d3 /std/http/file_server.ts | |
parent | e586d0c8b813c276cd5a1ba30582022b3c2be2eb (diff) |
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
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-x | std/http/file_server.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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<string, string> = { ".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", }; |