luci-base: dispatcher: add login indication on 403 errors
authorJo-Philipp Wich <jo@mein.io>
Fri, 16 Nov 2018 18:33:39 +0000 (19:33 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 16 Nov 2018 20:11:34 +0000 (21:11 +0100)
commit425a02734e28ec41403511aa1c46cbe489930ff1
treeec5b8cae02c75a7dc5f43dc877e848ad9a8a02bf
parent5dddb105d2f7a96bf135154c7aceb6f830bc0463
luci-base: dispatcher: add login indication on 403 errors

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>
modules/luci-base/luasrc/dispatcher.lua