Send a custom LuCI X-Header to indicate that a login is required to access
the requested resource. This is mainly intended for xhr.js to be able to
intercept such responses and popup an authentication dialog.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
context.path = {}
http.status(403, "Forbidden")
+ http.header("X-LuCI-Login-Required", "yes")
tmpl.render(track.sysauth_template or "sysauth", {
duser = default_user,
fuser = user
if not sid or not sdat then
http.status(403, "Forbidden")
+ http.header("X-LuCI-Login-Required", "yes")
return
end