diff --git a/http.js b/http.js index 874fe71..b05b638 100644 --- a/http.js +++ b/http.js @@ -28,8 +28,8 @@ if (!config.relays?.length) (async () => { } }); - const text = await request.text(); - relays = text.match(/(w{1,2}s)s?:\/\/.+/g); + const text = await request.body.text(); + config.relays = text.match(/(w{1,2}s)s?:\/\/.+/g); })(); if ( diff --git a/package.json b/package.json index 437c67a..3f2bb0c 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "homepage": "https://github.com/Yonle/bostr#readme", "dependencies": { "nostr-tools": "^2.5.2", + "undici": "^6.16.1", "ws": "^8.17.0" }, "optionalDependencies": {