repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
06a20ea
parent
907044e
author
Eric Bower
date
2023-10-07 18:31:42 +0000 UTC
chore(pgs): add more mime types to helper
2 files changed,  +10, -0
M pgs/config.go
+2, -0
1@@ -47,6 +47,8 @@ func NewConfigSite() *shared.ConfigSite {
2 			Description: "A zero-dependency static site hosting service for hackers.",
3 			IntroText:   intro,
4 			Space:       "pgs",
5+			// IMPORTANT: make sure `shared.GetMimeType` has the extensions being
6+			// added here.
7 			AllowedExt: []string{
8 				".jpg",
9 				".jpeg",
M shared/util.go
+8, -0
 1@@ -167,6 +167,14 @@ func GetMimeType(fpath string) string {
 2 		return "font/ttf"
 3 	} else if ext == ".md" {
 4 		return "text/markdown; charset=UTF-8"
 5+	} else if ext == ".json" || ext == ".map" {
 6+		return "application/json"
 7+	} else if ext == ".rss" {
 8+		return "application/rss+xml"
 9+	} else if ext == ".atom" {
10+		return "application/atom+xml"
11+	} else if ext == ".webmanifest" {
12+		return "application/manifest+json"
13 	}
14 
15 	return "text/plain"