Expect 200s.

This commit is contained in:
Ivaylo Novakov 2021-12-14 14:38:40 +02:00
parent 424b2e093b
commit 412ba559fa
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ log_by_lua_block {
headers = { ["Cookie"] = "skynet-jwt=" .. jwt },
})
if err or (res and res.status ~= ngx.HTTP_NO_CONTENT) then
if err or (res and res.status ~= ngx.HTTP_OK) then
ngx.log(ngx.ERR, "Failed malware-scanner request /scan/" .. skylink .. ": ", err or ("[HTTP " .. res.status .. "] " .. res.body))
end
end

View File

@ -30,7 +30,7 @@ log_by_lua_block {
headers = { ["Cookie"] = "skynet-jwt=" .. jwt },
})
if err or (res and res.status ~= ngx.HTTP_NO_CONTENT) then
if err or (res and res.status ~= ngx.HTTP_OK) then
ngx.log(ngx.ERR, "Failed malware-scanner request /scan/" .. skylink .. ": ", err or ("[HTTP " .. res.status .. "] " .. res.body))
end
end