Update URL

This commit is contained in:
Josué Tille 2019-05-16 17:23:21 +02:00
parent 163b357847
commit b63bfc2ed9
No known key found for this signature in database
GPG key ID: D5E068C6DFA8681D

View file

@ -379,9 +379,7 @@ if conf["unprotected_urls"] then
and not is_protected() then
if hlp.is_logged_in() then
hlp.set_headers()
elseif string.match(ngx.var.uri, "^/ynhpanel.js$")
or string.match(ngx.var.uri, "^/ynhpanel.css$")
or string.match(ngx.var.uri, "^/ynhpanel.json$") then
elseif string.match(ngx.var.uri, "^/ynh_portal.js$") then
local back_url = "https://" .. ngx.var.host .. ngx.var.uri .. hlp.uri_args_string()
return hlp.redirect(conf.portal_url.."?r="..ngx.encode_base64(back_url))
end
@ -397,9 +395,7 @@ if conf["unprotected_regex"] then
and not is_protected() then
if hlp.is_logged_in() then
hlp.set_headers()
elseif string.match(ngx.var.uri, "^/ynhpanel.js$")
or string.match(ngx.var.uri, "^/ynhpanel.css$")
or string.match(ngx.var.uri, "^/ynhpanel.json$") then
elseif string.match(ngx.var.uri, "^/ynh_portal.js$") then
local back_url = "https://" .. ngx.var.host .. ngx.var.uri .. hlp.uri_args_string()
return hlp.redirect(conf.portal_url.."?r="..ngx.encode_base64(back_url))
end
@ -409,7 +405,6 @@ if conf["unprotected_regex"] then
end
--
-- 8. Basic HTTP Authentication
--