summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/luci.js4
-rw-r--r--modules/luci-base/luasrc/view/header.htm1
-rw-r--r--modules/luci-base/root/etc/config/luci1
-rw-r--r--[-rwxr-xr-x]modules/luci-base/root/usr/libexec/rpcd/luci1
4 files changed, 5 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js
index ef9640e915..3a8c6b4b17 100644
--- a/modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/luci.js
@@ -1510,8 +1510,8 @@
if (rpcBaseURL == null) {
var rpcFallbackURL = this.url('admin/ubus');
- rpcBaseURL = Request.get('/ubus/').then(function(res) {
- return (rpcBaseURL = (res.status == 400) ? '/ubus/' : rpcFallbackURL);
+ rpcBaseURL = Request.get(this.env.ubuspath).then(function(res) {
+ return (rpcBaseURL = (res.status == 400) ? L.env.ubuspath : rpcFallbackURL);
}, function() {
return (rpcBaseURL = rpcFallbackURL);
}).then(function(url) {
diff --git a/modules/luci-base/luasrc/view/header.htm b/modules/luci-base/luasrc/view/header.htm
index 9cdedde5c2..6f7f0e48e7 100644
--- a/modules/luci-base/luasrc/view/header.htm
+++ b/modules/luci-base/luasrc/view/header.htm
@@ -24,6 +24,7 @@
requestpath = luci.dispatcher.context.requestpath,
dispatchpath = luci.dispatcher.context.path,
pollinterval = luci.config.main.pollinterval or 5,
+ ubuspath = luci.config.main.ubuspath or '/ubus',
sessionid = luci.dispatcher.context.authsession,
apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
diff --git a/modules/luci-base/root/etc/config/luci b/modules/luci-base/root/etc/config/luci
index 82c2230e55..91a0193873 100644
--- a/modules/luci-base/root/etc/config/luci
+++ b/modules/luci-base/root/etc/config/luci
@@ -2,6 +2,7 @@ config core main
option lang auto
option mediaurlbase /luci-static/bootstrap
option resourcebase /luci-static/resources
+ option ubuspath /ubus
config extern flash_keep
option uci "/etc/config/"
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index 56cb7bc85d..75afd27a00 100755..100644
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -216,6 +216,7 @@ local methods = {
rv.sysntpd = fs.readlink("/usr/sbin/ntpd") and true
rv.ipv6 = fs.access("/proc/net/ipv6_route")
rv.dropbear = fs.access("/usr/sbin/dropbear")
+ rv.cabundle = fs.access("/etc/ssl/certs/ca-certificates.crt")
local wifi_features = { "eap", "11n", "11ac", "11r", "11w", "acs", "sae", "owe", "suiteb192" }