diff --git a/docker/nginx/conf.d/client.conf b/docker/nginx/conf.d/client.conf index 276b8872..8376067d 100644 --- a/docker/nginx/conf.d/client.conf +++ b/docker/nginx/conf.d/client.conf @@ -176,6 +176,9 @@ server { -- example response: '{"skylink":"sia://XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg"}' local hnsres_json = json.decode(hnsres_res.body) + -- define local variable containing rest of the skylink if provided + local skylink_rest + if hnsres_json.skylink then -- try to match the skylink with sia:// prefix skylink, skylink_rest = string.match(hnsres_json.skylink, "sia://([^/?]+)(.*)")