Fix download file from public room (redirect to /login issue)

This commit is contained in:
Alexey Safronov 2024-07-09 13:28:32 +04:00
parent ac25dc567f
commit ef67bae358

View File

@ -104,7 +104,7 @@ server {
local accept_header = ngx.req.get_headers()["Accept"] local accept_header = ngx.req.get_headers()["Accept"]
if ngx.req.get_method() == "GET" and accept_header ~= nil and string.find(accept_header, "html") and not ngx.re.match(ngx.var.request_uri, "ds-vpath|/api/") then if ngx.req.get_method() == "GET" and accept_header ~= nil and string.find(accept_header, "html") and not ngx.re.match(ngx.var.request_uri, "ds-vpath|/api/") then
if not ngx.re.match(ngx.var.request_uri, "login|thirdparty|confirm|error|wizard|preparation-portal|unavailable|share=.|rooms/share(.*)key=.|/s/*|token=.") then if not ngx.re.match(ngx.var.request_uri, "login|filehandler|thirdparty|confirm|error|wizard|preparation-portal|unavailable|share=.|rooms/share(.*)key=.|/s/*|token=.") then
if ngx.var.http_cookie == nil or not string.find(ngx.var.http_cookie, "asc_auth_key") then if ngx.var.http_cookie == nil or not string.find(ngx.var.http_cookie, "asc_auth_key") then
if ngx.var.request_uri == "/" then if ngx.var.request_uri == "/" then
return ngx.redirect("/login") return ngx.redirect("/login")