add htyroottoken
This commit is contained in:
@@ -65,13 +65,15 @@ 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)
|
||||||
local res, err = httpc:request_uri(
|
local res, err = httpc:request_uri(
|
||||||
remote_url,
|
remote_url,
|
||||||
{
|
{
|
||||||
method = "POST",
|
method = "POST",
|
||||||
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
|
||||||
},
|
},
|
||||||
body = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}),
|
body = cjson.encode({task_type = TaskTypes.UPLOAD_PICTURE, data = {images = files}}),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user