Merge pull request #1123 from SkynetLabs/fix-tus-limits

fix tus upload limits not set
This commit is contained in:
Christopher Schinnerl 2021-09-02 11:13:43 +02:00 committed by GitHub
commit d22acae141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 -- this block runs only when accounts are enabled
if os.getenv("ACCOUNTS_ENABLED") ~= "true" then return end if os.getenv("ACCOUNTS_ENABLED") ~= "true" then return end
local httpc = require("resty.http").new()
-- fetch account limits and set max upload size accordingly -- fetch account limits and set max upload size accordingly
local res, err = httpc:request_uri("http://10.10.10.70:3000/user/limits", { local res, err = httpc:request_uri("http://10.10.10.70:3000/user/limits", {
headers = { ["Cookie"] = "skynet-jwt=" .. ngx.var.skynet_jwt } headers = { ["Cookie"] = "skynet-jwt=" .. ngx.var.skynet_jwt }