diff --git a/prod/upload/upload.lua b/prod/upload/upload.lua index 9c1b774..4584389 100644 --- a/prod/upload/upload.lua +++ b/prod/upload/upload.lua @@ -59,14 +59,16 @@ while true do local httpc = http.new() 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, 'authorization -> ', ngx.req.get_headers().Authorization) local res, err = httpc:request_uri( remote_url, { method = "POST", headers = { - ["Content-Type"] = "application/json" + ["Content-Type"] = "application/json", + ["Authorization"] = ngx.req.get_headers().Authorization }, - body = cjson.encode({task_type = 1, data = files}), + body = cjson.encode({task_type = 1, data = {images = files}}), } ) if 201 ~= res.status then