diff --git a/src/main.zig b/src/main.zig index 7e0db7f..06fdb80 100644 --- a/src/main.zig +++ b/src/main.zig @@ -234,6 +234,21 @@ fn handleGet(stream: std.net.Stream, path: []const u8, stats: *broadcaster.Stats var resp_buf: [8192]u8 = undefined; const response = std.fmt.bufPrint(&resp_buf, "HTTP/1.1 200 OK\r\nContent-Type: text/plain; version=0.0.4; charset=utf-8\r\nContent-Length: {d}\r\nConnection: close\r\n\r\n{s}", .{ body.len, body }) catch return; _ = stream.write(response) catch {}; + } else if (std.mem.eql(u8, path, "/")) { + httpRespond(stream, "200 OK", "text/plain", + \\ _ + \\ ___| | __ _ _ _ + \\|_ / |/ _` | | | | + \\ / /| | (_| | |_| | + \\/___|_|\__,_|\__, | + \\ |___/ + \\ + \\This is an atproto [https://atproto.com] relay instance, + \\running the zlay codebase [https://tangled.sh/zzstoatzz.io/zlay] + \\ + \\The firehose WebSocket path is at: /xrpc/com.atproto.sync.subscribeRepos + \\ + ); } else { httpRespond(stream, "404 Not Found", "text/plain", "not found"); }