From 97e6c9a0c2c32bf514d3a4218d239741f1dc26c8 Mon Sep 17 00:00:00 2001 From: bndw Date: Fri, 13 Feb 2026 20:50:27 -0800 Subject: feat: add HTML index page for browser viewing Add a beautiful HTML landing page when visiting relay in browser: - Shows all three protocol endpoints (gRPC, Connect, WebSocket) - Lists supported NIPs (01, 09, 11) - Displays relay features and info - Responsive design with gradient styling - Serves on GET requests (regular Accept header) - NIP-11 still served for Accept: application/nostr+json --- cmd/relay/main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/relay') diff --git a/cmd/relay/main.go b/cmd/relay/main.go index 9cf6ad6..56668fc 100644 --- a/cmd/relay/main.go +++ b/cmd/relay/main.go @@ -51,6 +51,7 @@ func main() { mux.Handle(path, handler) wsHandler := wshandler.NewHandler(store, subManager) + wsHandler.SetIndexData(*grpcAddr, *wsAddr, *wsAddr) mux.Handle("/", wsHandler) grpcLis, err := net.Listen("tcp", *grpcAddr) -- cgit v1.2.3