luci-base: use actual JSON-RPC for verifying ubus RPC URL
authorRafał Miłecki <rafal@milecki.pl>
Mon, 14 Sep 2020 16:31:07 +0000 (18:31 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 15 Sep 2020 08:34:39 +0000 (10:34 +0200)
commitbc6e4dfe29165f484a7fb18a2e0f9b2ae3bfd809
treefbcb59f4d06db4e51469f14a7c4f7c4025f6b92f
parent5ca328440b3a41ab6d415ec96f9db4339715de67
luci-base: use actual JSON-RPC for verifying ubus RPC URL

Sending GET request to the main RPC base URL and expecting HTTP response
code 400 had two flaws:
1. It was not verifying actual JSON-RPC interface availability
2. It did not allow implementing support for new requests

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js