Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from SkynetLabs/patch-for-bad-lua-condition
Browse files Browse the repository at this point in the history
fix dnslink and hns endpoints
  • Loading branch information
Christopher Schinnerl authored Jun 21, 2022
2 parents e688699 + 43912ab commit ac43adf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nginx/conf.d/include/location-hns
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rewrite_by_lua_block {
ngx.status = (hnsres_err and ngx.HTTP_INTERNAL_SERVER_ERROR) or hnsres_res.status
-- do not send response on unauthorized error (status code 401)
-- otherwise we will not be able to display custom error page
if ngx.status != ngx.HTTP_UNAUTHORIZED then
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
ngx.header["content-type"] = "text/plain"
ngx.say(hnsres_err or hnsres_res.body)
end
Expand Down Expand Up @@ -55,7 +55,7 @@ rewrite_by_lua_block {
ngx.status = (registry_err and ngx.HTTP_INTERNAL_SERVER_ERROR) or registry_res.status
-- do not send response on unauthorized error (status code 401)
-- otherwise we will not be able to display custom error page
if ngx.status != ngx.HTTP_UNAUTHORIZED then
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
ngx.header["content-type"] = "text/plain"
ngx.say(registry_err or registry_res.body)
end
Expand Down
2 changes: 1 addition & 1 deletion nginx/conf.d/server/server.dnslink
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ location / {
ngx.status = (err and ngx.HTTP_INTERNAL_SERVER_ERROR) or res.status
-- do not send response on unauthorized error (status code 401)
-- otherwise we will not be able to display custom error page
if ngx.status != ngx.HTTP_UNAUTHORIZED then
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
ngx.header["content-type"] = "text/plain"
ngx.say(err or res.body)
end
Expand Down

0 comments on commit ac43adf

Please sign in to comment.