mime: add javascript module mime type (.mjs)

There are default mime types in this package for handling static content, but there's
a new one missing ".mjs"  that is "Content-Type: text/javascript".

https://developers.google.com/web/fundamentals/primers/modules#mjs

Change-Id: Ie842ece0cb55770fb6c9eb65f8bfee2ecf7bc624
GitHub-Last-Rev: e26d9f7617
GitHub-Pull-Request: golang/go#31071
Reviewed-on: https://go-review.googlesource.com/c/go/+/169502
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
John 2019-03-27 17:30:32 +00:00 committed by Brad Fitzpatrick
parent d47db6dc0c
commit f7f4eef385
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ var builtinTypesLower = map[string]string{
".png": "image/png",
".svg": "image/svg+xml",
".xml": "text/xml; charset=utf-8",
".mjs": "text/javascript",
}
var once sync.Once // guards initMime