about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bskyweb/cmd/bskyweb/.gitignore1
-rw-r--r--bskyweb/cmd/bskyweb/server.go8
-rw-r--r--bskyweb/static/.well-known/apple-app-site-association13
-rw-r--r--bskyweb/static/.well-known/assetlinks.json11
4 files changed, 33 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
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 000000000..232acdf25
--- /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 000000000..5ca12d5b3
--- /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"]
+    }
+  }
+]