drop 404 not found on hnsres error
This commit is contained in:
parent
936d4ecd0c
commit
8b88331065
|
@ -138,6 +138,11 @@ server {
|
|||
local json = require('cjson')
|
||||
local hns_domain_name, request_uri_rest = string.match(ngx.var.request_uri, "/hns/([^/?]+)(.*)")
|
||||
local hnsres_res = ngx.location.capture("/hnsres/" .. hns_domain_name)
|
||||
|
||||
if hnsres_res.status ~= ngx.HTTP_OK then
|
||||
ngx.exit(ngx.HTTP_NOT_FOUND)
|
||||
end
|
||||
|
||||
local hnsres_json = json.decode(hnsres_res.body)
|
||||
local skylink_prefix, skylink, skylink_rest = string.match(hnsres_json.skylink, "(sia://)([^/?]+)(.*)")
|
||||
|
||||
|
|
Reference in New Issue