mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-10-01 19:43:49 +00:00
Serve the OpenAccess descriptor at /.well-known/openaccess.json (#127)
Spec: https://logicsrc.com/openaccess Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWRffW4ifQPUrGXJtgYWMd
This commit is contained in:
parent
d2e4b56ae7
commit
aad61eec17
5 changed files with 101 additions and 0 deletions
|
|
@ -272,6 +272,9 @@ func main() {
|
|||
mux.HandleFunc("/verify", a.handleVerify)
|
||||
mux.HandleFunc("/irc-auth", a.handleIRCAuth) // Ergo auth-script: members-only gate
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write([]byte("ok")) })
|
||||
// OpenAccess descriptor for the BBS host itself (Caddy proxies the
|
||||
// well-known path here); the files host serves the same one.
|
||||
mux.Handle(files.OpenAccessPath, files.OpenAccessHandler())
|
||||
log.Info("verify endpoint listening", "addr", verifyAddr)
|
||||
srv := &http.Server{Addr: verifyAddr, Handler: mux, ReadHeaderTimeout: 5 * time.Second}
|
||||
if err := srv.ListenAndServe(); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue