diff options
author | Florian Eckert <fe@dev.tdt.de> | 2019-10-02 08:24:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 08:24:17 +0200 |
commit | 93934c08ca0d20c132138f23f4ded68c1b8080b8 (patch) | |
tree | 7c6387e6bae48548743f4dfb5239dd75cc630dd5 | |
parent | 68190f43ca38d67e6d1e821f55c3cfbb1e6018ca (diff) | |
parent | 444b1c126e2d197bc42590ec61b0bd9d419b4845 (diff) |
Merge pull request #3137 from stangri/master-luci-app-vpnbypass
luci-app-vpnbypass: fix dispatcher bug when VPN node is present
-rw-r--r-- | applications/luci-app-vpnbypass/Makefile | 2 | ||||
-rw-r--r-- | applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/applications/luci-app-vpnbypass/Makefile b/applications/luci-app-vpnbypass/Makefile index 2e26a5158..51c3dafa7 100644 --- a/applications/luci-app-vpnbypass/Makefile +++ b/applications/luci-app-vpnbypass/Makefile @@ -10,7 +10,7 @@ LUCI_TITLE:=VPN Bypass Web UI LUCI_DESCRIPTION:=Provides Web UI for VPNBypass service. LUCI_DEPENDS:=+luci-mod-admin-full +vpnbypass LUCI_PKGARCH:=all -PKG_RELEASE:=9 +PKG_RELEASE:=10 include ../../luci.mk diff --git a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua index 95971fab1..75c681ec4 100644 --- a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua +++ b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua @@ -30,7 +30,11 @@ function en.write() sys.init.enable(packageName) sys.init.start(packageName) end - http.redirect(dispatcher.build_url("admin/services/" .. packageName)) + if dispatcher.lookup("admin/vpn") then + http.redirect(dispatcher.build_url("admin/vpn/" .. packageName)) + else + http.redirect(dispatcher.build_url("admin/services/" .. packageName)) + end end s = m:section(NamedSection, "config", "vpnbypass", translate("VPN Bypass Rules")) |