diff options
| -rw-r--r-- | cmd/xesite/main.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/xesite/main.go b/cmd/xesite/main.go index a59e690..2b94054 100644 --- a/cmd/xesite/main.go +++ b/cmd/xesite/main.go @@ -5,6 +5,7 @@ import ( "flag" "log" "log/slog" + "mime" "net" "net/http" "os" @@ -34,6 +35,10 @@ var ( siteURL = flag.String("site-url", "https://xeiaso.net/", "URL to use for the site") ) +func init() { + mime.AddExtensionType(".rss", "application/rss+xml") +} + func main() { flagenv.Parse() flag.Parse() @@ -82,7 +87,8 @@ func main() { } mux := http.NewServeMux() - mux.Handle("/", http.FileServer(http.FS(fs))) + mux.Handle("/", http.FileServerFS(fs)) + //mux.Handle("/", http.FileServer(http.FS(fs))) mux.Handle("/api/defs/", http.StripPrefix("/api/defs/", http.FileServer(http.FS(pb.Proto)))) ms := pb.NewMetaServer(&MetaServer{fs}, twirp.WithServerPathPrefix("/api")) |
