From 4dc3588f81b4ea0b331f0cb1a02b90ebf7be1b2f Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 3 Nov 2020 16:24:56 +0100 Subject: [PATCH] support skydb in hns --- docker/nginx/conf.d/client.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/nginx/conf.d/client.conf b/docker/nginx/conf.d/client.conf index 49c4eae5..5f3866a6 100644 --- a/docker/nginx/conf.d/client.conf +++ b/docker/nginx/conf.d/client.conf @@ -168,9 +168,6 @@ server { -- make a get request to /skynet/registry endpoint with the credentials from text record local registry_res = ngx.location.capture("/skynet/registry?publickey=" .. publickey .. "&datakey=" .. datakey) - ngx.header.content_type = 'text/plain' - ngx.print(registry_res.body) - -- we want to fail with a generic 404 when /skynet/registry returns anything but 200 OK if registry_res.status ~= ngx.HTTP_OK then ngx.exit(ngx.HTTP_NOT_FOUND) @@ -183,6 +180,10 @@ server { return string.char(tonumber(cc, 16)) end)) + ngx.header.content_type = 'text/plain' + ngx.print(data) + ngx.exit(ngx.HTTP_OK) + skylink = data end