Merge pull request #3139 from stangri/19.07-luci-app-vpnbypass

luci-app-vpnbypass: fix dispatcher bug when VPN node is present
This commit is contained in:
Florian Eckert 2019-10-02 08:25:01 +02:00 committed by GitHub
commit ba0b8e3e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -30,7 +30,11 @@ function en.write()
sys.init.enable(packageName)
sys.init.start(packageName)
end
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"))