Remove html from text handler, add yaml/toml/sh/ps1
This commit is contained in:
parent
fdd33376ce
commit
a94b7e208d
|
@ -12,7 +12,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.81.0"
|
ReleaseVersion string = "0.82.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -46,23 +46,27 @@ func (t Format) Extensions() map[string]string {
|
||||||
return map[string]string{
|
return map[string]string{
|
||||||
`.css`: `text/css`,
|
`.css`: `text/css`,
|
||||||
`.csv`: `text/csv`,
|
`.csv`: `text/csv`,
|
||||||
`.htm`: `text/html`,
|
|
||||||
`.html`: `text/html`,
|
|
||||||
`.js`: `text/javascript`,
|
`.js`: `text/javascript`,
|
||||||
`.json`: `application/json`,
|
`.json`: `application/json`,
|
||||||
`.md`: `text/markdown`,
|
`.md`: `text/markdown`,
|
||||||
|
`.ps1`: `text/plain`,
|
||||||
|
`.sh`: `application./x-sh`,
|
||||||
|
`.toml`: `application/toml`,
|
||||||
`.txt`: `text/plain`,
|
`.txt`: `text/plain`,
|
||||||
`.xml`: `application/xml`,
|
`.xml`: `application/xml`,
|
||||||
|
`.yml`: `application/yaml`,
|
||||||
|
`.yaml`: `application/yaml`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t Format) MimeTypes() []string {
|
func (t Format) MimeTypes() []string {
|
||||||
return []string{
|
return []string{
|
||||||
`application/json`,
|
`application/json`,
|
||||||
|
`application/toml`,
|
||||||
`application/xml`,
|
`application/xml`,
|
||||||
|
`application/yaml`,
|
||||||
`text/css`,
|
`text/css`,
|
||||||
`text/csv`,
|
`text/csv`,
|
||||||
`text/html`,
|
|
||||||
`text/javascript`,
|
`text/javascript`,
|
||||||
`text/plain`,
|
`text/plain`,
|
||||||
`text/plain; charset=utf-8`,
|
`text/plain; charset=utf-8`,
|
||||||
|
|
Loading…
Reference in New Issue