Merge pull request #158 from YunoHost/dont_set_header_unallowed_users

Don't set header if user don't have access
This commit is contained in:
Alexandre Aubin 2020-04-01 02:36:58 +02:00 committed by GitHub
commit 286eb771a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -320,8 +320,9 @@ if longest_unprotected_match ~= ""
and string.len(longest_unprotected_match) > string.len(longest_protected_match) then
if hlp.is_logged_in() then
serveYnhpanel()
hlp.set_headers()
if hlp.has_access() then
hlp.set_headers()
end
end
logger.debug(ngx.var.uri.." is in unprotected_urls")
return hlp.pass()