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

Commit ac43adf

Browse files
author
Christopher Schinnerl
authored
Merge pull request #16 from SkynetLabs/patch-for-bad-lua-condition
fix dnslink and hns endpoints
2 parents e688699 + 43912ab commit ac43adf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nginx/conf.d/include/location-hns

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rewrite_by_lua_block {
1818
ngx.status = (hnsres_err and ngx.HTTP_INTERNAL_SERVER_ERROR) or hnsres_res.status
1919
-- do not send response on unauthorized error (status code 401)
2020
-- otherwise we will not be able to display custom error page
21-
if ngx.status != ngx.HTTP_UNAUTHORIZED then
21+
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
2222
ngx.header["content-type"] = "text/plain"
2323
ngx.say(hnsres_err or hnsres_res.body)
2424
end
@@ -55,7 +55,7 @@ rewrite_by_lua_block {
5555
ngx.status = (registry_err and ngx.HTTP_INTERNAL_SERVER_ERROR) or registry_res.status
5656
-- do not send response on unauthorized error (status code 401)
5757
-- otherwise we will not be able to display custom error page
58-
if ngx.status != ngx.HTTP_UNAUTHORIZED then
58+
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
5959
ngx.header["content-type"] = "text/plain"
6060
ngx.say(registry_err or registry_res.body)
6161
end

nginx/conf.d/server/server.dnslink

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ location / {
2626
ngx.status = (err and ngx.HTTP_INTERNAL_SERVER_ERROR) or res.status
2727
-- do not send response on unauthorized error (status code 401)
2828
-- otherwise we will not be able to display custom error page
29-
if ngx.status != ngx.HTTP_UNAUTHORIZED then
29+
if ngx.status ~= ngx.HTTP_UNAUTHORIZED then
3030
ngx.header["content-type"] = "text/plain"
3131
ngx.say(err or res.body)
3232
end

0 commit comments

Comments
 (0)