luci-base: add ubus-http gateway
authorJo-Philipp Wich <jo@mein.io>
Thu, 7 Feb 2019 17:40:36 +0000 (18:40 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 7 Jul 2019 13:25:49 +0000 (15:25 +0200)
commitc89bbd50fdba8b07930c29bae6ca71cc54515e2c
treefea7f220e1fa00538b6c3270910afc5cf33bd43d
parent558f8c3b2a40d187068e339be70d4173b555d4a5
luci-base: add ubus-http gateway

Add an admin/ubus route mimicking the native uhttpd-mod-ubus protocol.

The main difference to the native protocol is that this gateway requires
no additional per-object/procedure ACL setup on the router side and that
it is located under the same prefix as LuCI itself, allowing the reuse
of the session login cookie.

This route is meant to be a transitional mechanism until client side
RPC calls are eventually migrated to uhttpd-mod-ubus completely.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js
modules/luci-base/luasrc/controller/admin/index.lua