diff options
Diffstat (limited to 'bskyweb/cmd')
-rw-r--r-- | bskyweb/cmd/bskyweb/.gitignore | 1 | ||||
-rw-r--r-- | bskyweb/cmd/bskyweb/server.go | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/bskyweb/cmd/bskyweb/.gitignore b/bskyweb/cmd/bskyweb/.gitignore new file mode 100644 index 000000000..45883bf13 --- /dev/null +++ b/bskyweb/cmd/bskyweb/.gitignore @@ -0,0 +1 @@ +bskyweb diff --git a/bskyweb/cmd/bskyweb/server.go b/bskyweb/cmd/bskyweb/server.go index 6daec493e..f861d58f1 100644 --- a/bskyweb/cmd/bskyweb/server.go +++ b/bskyweb/cmd/bskyweb/server.go @@ -64,6 +64,7 @@ func serve(cctx *cli.Context) error { staticHandler := http.FileServer(func() http.FileSystem { if debug { + log.Debugf("serving static file from the local file system") return http.FS(os.DirFS("static")) } fsys, err := fs.Sub(bskyweb.StaticFS, "static") @@ -100,9 +101,16 @@ func serve(cctx *cli.Context) error { RedirectCode: http.StatusFound, })) + // // configure routes + // + + // static files e.GET("/robots.txt", echo.WrapHandler(staticHandler)) e.GET("/static/*", echo.WrapHandler(http.StripPrefix("/static/", staticHandler))) + e.GET("/.well-known/assetlinks.json", echo.WrapHandler(staticHandler)) + + // home e.GET("/", server.WebHome) // generic routes |