Monorepo for Tangled tangled.org
4

Configure Feed

Select the types of activity you want to include in your feed.

appview/{config,state}: gate xrpc router behind TANGLED_XRPC_ENABLED

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

+8 -2
+4
appview/config/config.go
··· 23 23 Dev bool `env:"DEV, default=false"` 24 24 DisallowedNicknamesFile string `env:"DISALLOWED_NICKNAMES_FILE"` 25 25 26 + // gates the org.tangled.* xrpc router (/xrpc). off by default; the svelte 27 + // frontend is the only consumer and isn't shipped yet. 28 + XrpcEnabled bool `env:"XRPC_ENABLED, default=false"` 29 + 26 30 // origin allowed to call the xrpc endpoints from the browser (the svelte 27 31 // frontend). empty allows any origin, which is safe here since xrpc uses 28 32 // bearer service-auth tokens rather than cookies.
+4 -2
appview/state/router.go
··· 18 18 "tangled.org/core/appview/middleware" 19 19 "tangled.org/core/appview/migration" 20 20 "tangled.org/core/appview/notifications" 21 + whnotify "tangled.org/core/appview/notify/webhook" 21 22 "tangled.org/core/appview/pipelines" 22 23 "tangled.org/core/appview/pulls" 23 24 "tangled.org/core/appview/repo" ··· 25 26 "tangled.org/core/appview/signup" 26 27 "tangled.org/core/appview/spindles" 27 28 "tangled.org/core/appview/state/userutil" 28 - whnotify "tangled.org/core/appview/notify/webhook" 29 29 avstrings "tangled.org/core/appview/strings" 30 30 avtimeline "tangled.org/core/appview/timeline" 31 31 avxrpc "tangled.org/core/appview/xrpc" ··· 299 299 r.Mount("/focus", s.FocusRouter(mw)) 300 300 301 301 r.Mount("/signup", s.SignupRouter()) 302 - r.Mount("/xrpc", s.XrpcRouter()) 302 + if s.config.Core.XrpcEnabled { 303 + r.Mount("/xrpc", s.XrpcRouter()) 304 + } 303 305 r.Mount("/", s.oauth.Router()) 304 306 305 307 r.Get("/terms", s.TermsOfService)