Remove html from text handler, add yaml/toml/sh/ps1

This commit is contained in:
Seednode 2023-09-13 23:32:02 -05:00
parent fdd33376ce
commit a94b7e208d
2 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "0.81.0"
ReleaseVersion string = "0.82.0"
)
var (

View File

@ -46,23 +46,27 @@ func (t Format) Extensions() map[string]string {
return map[string]string{
`.css`: `text/css`,
`.csv`: `text/csv`,
`.htm`: `text/html`,
`.html`: `text/html`,
`.js`: `text/javascript`,
`.json`: `application/json`,
`.md`: `text/markdown`,
`.ps1`: `text/plain`,
`.sh`: `application./x-sh`,
`.toml`: `application/toml`,
`.txt`: `text/plain`,
`.xml`: `application/xml`,
`.yml`: `application/yaml`,
`.yaml`: `application/yaml`,
}
}
func (t Format) MimeTypes() []string {
return []string{
`application/json`,
`application/toml`,
`application/xml`,
`application/yaml`,
`text/css`,
`text/csv`,
`text/html`,
`text/javascript`,
`text/plain`,
`text/plain; charset=utf-8`,