From 2b31f6c34a0d9f7702df2acd7ead270421af4c38 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 5 Aug 2020 14:47:15 +0300 Subject: [PATCH] Support only `sia://HASH` skylinks. --- handshake-api/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handshake-api/index.js b/handshake-api/index.js index 896514fb..24f7347a 100644 --- a/handshake-api/index.js +++ b/handshake-api/index.js @@ -19,8 +19,7 @@ const clientOptions = { }; const client = new NodeClient(clientOptions); -// Match both `sia://HASH` and `HASH` links. -const startsWithSkylinkRegExp = /^(sia:\/\/){0,1}[a-zA-Z0-9_-]{46}/; +const startsWithSkylinkRegExp = /^sia:\/\/[a-zA-Z0-9_-]{46}/; const getDomainRecords = async (name) => { const response = await client.execute("getnameresource", [name]);