fix tracking

This commit is contained in:
Karol Wypchlo 2021-02-16 16:12:38 +01:00
parent bcfb6943f9
commit c04515daf5
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ server {
if skylink and ngx.status >= ngx.HTTP_OK and ngx.status < ngx.HTTP_SPECIAL_RESPONSE then if skylink and ngx.status >= ngx.HTTP_OK and ngx.status < ngx.HTTP_SPECIAL_RESPONSE then
local http = require("socket.http") local http = require("socket.http")
local headers = { Cookie = ngx.req.get_headers()["Cookie"] } local headers = { Cookie = ngx.req.get_headers()["Cookie"] }
local query = table.concat({ "status=" .. $status, "bytes=" .. $body_bytes_sent }, "&") local query = table.concat({ "status=" .. ngx.status, "bytes=" .. ngx.body_bytes_sent }, "&")
local ok, statusCode, headers, statusText = http.request { local ok, statusCode, headers, statusText = http.request {
url = "http://accounts:3000/track/download/" .. skylink .. "?" .. query, url = "http://accounts:3000/track/download/" .. skylink .. "?" .. query,
method = "POST", method = "POST",