rename sudo token key

This commit is contained in:
moicen
2021-10-19 20:46:34 +08:00
parent 0d3d999230
commit 7a3dcf279e
+2 -2
View File
@@ -65,7 +65,7 @@ while true do
local remote_url = string.format("%s/api/v1/ts/create_task", task_server) local remote_url = string.format("%s/api/v1/ts/create_task", task_server)
ngx.log(ngx.INFO, 'remote_url -> ', remote_url) ngx.log(ngx.INFO, 'remote_url -> ', remote_url)
ngx.log(ngx.INFO, 'authorization -> ', ngx.req.get_headers().Authorization) ngx.log(ngx.INFO, 'authorization -> ', ngx.req.get_headers().Authorization)
ngx.log(ngx.INFO, 'htyroottoken -> ', ngx.req.get_headers().HtyRootToken) ngx.log(ngx.INFO, 'HtySudoerToken -> ', ngx.req.get_headers().HtySudoerToken)
local res, err = httpc:request_uri( local res, err = httpc:request_uri(
remote_url, remote_url,
{ {
@@ -73,7 +73,7 @@ while true do
headers = { headers = {
["Content-Type"] = "application/json", ["Content-Type"] = "application/json",
["Authorization"] = ngx.req.get_headers().Authorization, ["Authorization"] = ngx.req.get_headers().Authorization,
["HtyRootToken"] = ngx.req.get_headers().HtyRootToken ["HtySudoerToken"] = ngx.req.get_headers().HtySudoerToken
}, },
body = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}), body = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}),
} }