Support only `sia://HASH` skylinks.
This commit is contained in:
parent
4e37707a07
commit
2b31f6c34a
|
@ -19,8 +19,7 @@ const clientOptions = {
|
||||||
};
|
};
|
||||||
const client = new NodeClient(clientOptions);
|
const client = new NodeClient(clientOptions);
|
||||||
|
|
||||||
// Match both `sia://HASH` and `HASH` links.
|
const startsWithSkylinkRegExp = /^sia:\/\/[a-zA-Z0-9_-]{46}/;
|
||||||
const startsWithSkylinkRegExp = /^(sia:\/\/){0,1}[a-zA-Z0-9_-]{46}/;
|
|
||||||
|
|
||||||
const getDomainRecords = async (name) => {
|
const getDomainRecords = async (name) => {
|
||||||
const response = await client.execute("getnameresource", [name]);
|
const response = await client.execute("getnameresource", [name]);
|
||||||
|
|
Reference in New Issue