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