add/serve .well-known files
This commit is contained in:
parent
7b6948e617
commit
c98b65f6a9
4 changed files with 33 additions and 0 deletions
1
bskyweb/cmd/bskyweb/.gitignore
vendored
Normal file
1
bskyweb/cmd/bskyweb/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bskyweb
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue