diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-01-16 15:36:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 15:36:05 +0100 |
commit | b65588ebc65d39ed978902c87cfb1b43773cb0a0 (patch) | |
tree | ef6faeca6b369cf38c9b5640b753a5f4294e624f /modules/luci-base/htdocs/luci-static/resources/luci.js | |
parent | f545b29aaf6c63a74321a1e5e4655e71330b33b3 (diff) | |
parent | 5e6ec8562fe828934ef835490cee405653b06d3a (diff) |
Merge pull request #3511 from Ansuel/no-hard
luci-base: remove hardcoded cgi-bin path
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/luci.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 69e1929945..3a8c6b4b17 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -1192,6 +1192,8 @@ if (env.base_url == null) this.error('InternalError', 'Cannot find url of luci.js'); + env.cgi_base = env.scriptname.replace(/\/[^\/]+$/, ''); + Object.assign(this.env, env); document.addEventListener('poll-start', function(ev) { |