diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2020-01-16 15:16:09 +0100 |
---|---|---|
committer | Ansuel Smith <ansuelsmth@gmail.com> | 2020-01-16 15:16:09 +0100 |
commit | 529bde44081d0bc07a064e9dfb1f0b3f35e61061 (patch) | |
tree | ff6ca39ef39f33a3d022db1c6f42a31a19465711 /modules/luci-base/htdocs/luci-static | |
parent | 88b9d58a44ea52e812cf0c0db5b5b6b87783bd7e (diff) |
luci-base: make rpc webserver path configurable
Currently the ubus path that provide the webserver is hardcoded to be /ubus.
Change this to make it configurable from the luci config file.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 4 |
1 files changed, 2 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 808ab0c5cb..69e1929945 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -1508,8 +1508,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) { |