summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2019-10-01 18:22:35 -0700
committerStan Grishin <stangri@melmac.net>2019-10-01 18:22:35 -0700
commit444b1c126e2d197bc42590ec61b0bd9d419b4845 (patch)
tree7c6387e6bae48548743f4dfb5239dd75cc630dd5 /applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
parent68190f43ca38d67e6d1e821f55c3cfbb1e6018ca (diff)
luci-app-vpnbypass: fix dispatcher bug when VPN node is present
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua')
-rw-r--r--applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
index 95971fab1b..75c681ec44 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"))