fix tus upload limits not set

This commit is contained in:
Karol Wypchlo 2021-09-02 10:16:41 +02:00
parent cf612a804a
commit f6f3863736
No known key found for this signature in database
GPG Key ID: C92C016317A964D0
1 changed files with 2 additions and 0 deletions

View File

@ -173,6 +173,8 @@ location /skynet/tus {
-- this block runs only when accounts are enabled
if os.getenv("ACCOUNTS_ENABLED") ~= "true" then return end
local httpc = require("resty.http").new()
-- fetch account limits and set max upload size accordingly
local res, err = httpc:request_uri("http://10.10.10.70:3000/user/limits", {
headers = { ["Cookie"] = "skynet-jwt=" .. ngx.var.skynet_jwt }