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) {
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),