diff --git a/bskyweb/cmd/bskyweb/.gitignore b/bskyweb/cmd/bskyweb/.gitignore new file mode 100644 index 00000000..45883bf1 --- /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 6daec493..f861d58f 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 diff --git a/bskyweb/static/.well-known/apple-app-site-association b/bskyweb/static/.well-known/apple-app-site-association new file mode 100644 index 00000000..232acdf2 --- /dev/null +++ b/bskyweb/static/.well-known/apple-app-site-association @@ -0,0 +1,13 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appID": "B3LX46C5HS.xyz.blueskyweb.app", + "paths": [ + "*" + ] + } + ] + } +} \ No newline at end of file diff --git a/bskyweb/static/.well-known/assetlinks.json b/bskyweb/static/.well-known/assetlinks.json new file mode 100644 index 00000000..5ca12d5b --- /dev/null +++ b/bskyweb/static/.well-known/assetlinks.json @@ -0,0 +1,11 @@ +[ + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "xyz.blueskyweb.app", + "sha256_cert_fingerprints": + ["C1:4D:3C:6B:B5:D6:D9:AE:CF:C5:0B:BC:C1:9B:29:6D:D4:E6:87:46:36:D5:4C:1A:64:1C:14:08:BF:7E:F9:62", "FA:C6:17:45:DC:09:03:78:6F:B9:ED:E6:2A:96:2B:39:9F:73:48:F0:BB:6F:89:9B:83:32:66:75:91:03:3B:9C"] + } + } +]