Android app (TWA) in android/, built with podman; serve assetlinks.json for it

This commit is contained in:
Astra 2026-10-03 12:44:11 +01:00
parent 44708d5f3c
commit 7900bf5b3e
21 changed files with 313 additions and 0 deletions

View file

@ -31,6 +31,10 @@ type Config struct {
// Limits used when SimpleAdmin's config file isn't available.
MaxBanDuration int
MaxMuteDuration int
// The Android app (android/ in this repo), for /.well-known/assetlinks.json: its package and
// the SHA-256 fingerprints of the keys it's signed with. Empty serves no assetlinks.json.
AndroidPackage string
AndroidCerts []string
}
type Server struct {
@ -84,6 +88,7 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("GET /manifest.webmanifest", s.manifest(false))
mux.HandleFunc("GET /admin.webmanifest", s.manifest(true))
mux.HandleFunc("GET /sw.js", serviceWorker(static))
mux.HandleFunc("GET /.well-known/assetlinks.json", s.assetLinks)
mux.HandleFunc("GET /auth/login", s.login)
mux.HandleFunc("GET /auth/callback", s.callback)