feat(instance): public profile endpoint GET /api/instance (hub-app M1)
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"git.dcntrlized.org/Dcntrlized/Maestro/handlers/actions"
|
||||
"git.dcntrlized.org/Dcntrlized/Maestro/handlers/auth"
|
||||
"git.dcntrlized.org/Dcntrlized/Maestro/handlers/containers"
|
||||
handlersinstance "git.dcntrlized.org/Dcntrlized/Maestro/handlers/instance"
|
||||
"git.dcntrlized.org/Dcntrlized/Maestro/handlers/peers"
|
||||
handlers "git.dcntrlized.org/Dcntrlized/Maestro/handlers/registry"
|
||||
libcontainers "git.dcntrlized.org/Dcntrlized/Maestro/lib/containers"
|
||||
@@ -150,6 +151,12 @@ func main() {
|
||||
mux.HandleFunc("/api/auth/logout", authService.Logout)
|
||||
mux.Handle("/api/auth/change-password", gate(http.HandlerFunc(authService.ChangePassword)))
|
||||
|
||||
// Instance public profile (hub-app theme M1): the one additional
|
||||
// unauthenticated surface — deliberately allowlisted around the owner
|
||||
// gate (cross-theme contract, hub-app D2). Exact path only; sub-paths
|
||||
// like /api/instance/attestation (federation) are registered separately.
|
||||
mux.Handle("/api/instance", handlersinstance.NewPublicProfileHandler(cache.GetServices, dataRoot))
|
||||
|
||||
mux.Handle("/api/ws", authService.GateWebSocket(http.HandlerFunc(wsHub.HandleWS)))
|
||||
mux.Handle("/api/containers", gate(containers.NewListContainersHandler(cache)))
|
||||
mux.Handle("/api/containers/install", gate(containers.InstallContainerHandler(cache)))
|
||||
|
||||
Reference in New Issue
Block a user