Merge pull request #3517 from Ansuel/ubus_short
luci-base: make rpc webserver path configurable
This commit is contained in:
commit
f545b29aaf
3 changed files with 4 additions and 2 deletions
|
@ -1508,8 +1508,8 @@
|
||||||
if (rpcBaseURL == null) {
|
if (rpcBaseURL == null) {
|
||||||
var rpcFallbackURL = this.url('admin/ubus');
|
var rpcFallbackURL = this.url('admin/ubus');
|
||||||
|
|
||||||
rpcBaseURL = Request.get('/ubus/').then(function(res) {
|
rpcBaseURL = Request.get(this.env.ubuspath).then(function(res) {
|
||||||
return (rpcBaseURL = (res.status == 400) ? '/ubus/' : rpcFallbackURL);
|
return (rpcBaseURL = (res.status == 400) ? L.env.ubuspath : rpcFallbackURL);
|
||||||
}, function() {
|
}, function() {
|
||||||
return (rpcBaseURL = rpcFallbackURL);
|
return (rpcBaseURL = rpcFallbackURL);
|
||||||
}).then(function(url) {
|
}).then(function(url) {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
requestpath = luci.dispatcher.context.requestpath,
|
requestpath = luci.dispatcher.context.requestpath,
|
||||||
dispatchpath = luci.dispatcher.context.path,
|
dispatchpath = luci.dispatcher.context.path,
|
||||||
pollinterval = luci.config.main.pollinterval or 5,
|
pollinterval = luci.config.main.pollinterval or 5,
|
||||||
|
ubuspath = luci.config.main.ubuspath or '/ubus',
|
||||||
sessionid = luci.dispatcher.context.authsession,
|
sessionid = luci.dispatcher.context.authsession,
|
||||||
apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
|
apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
|
||||||
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
||||||
|
|
|
@ -2,6 +2,7 @@ config core main
|
||||||
option lang auto
|
option lang auto
|
||||||
option mediaurlbase /luci-static/bootstrap
|
option mediaurlbase /luci-static/bootstrap
|
||||||
option resourcebase /luci-static/resources
|
option resourcebase /luci-static/resources
|
||||||
|
option ubuspath /ubus
|
||||||
|
|
||||||
config extern flash_keep
|
config extern flash_keep
|
||||||
option uci "/etc/config/"
|
option uci "/etc/config/"
|
||||||
|
|
Loading…
Reference in a new issue