From 3b633e435539705c25b4c1e24e862dc78d550564 Mon Sep 17 00:00:00 2001 From: Rubyn Angelo Stark Date: Fri, 29 Nov 2024 19:51:09 +0000 Subject: [PATCH] allow setting NO port forwards => clears forwarded ports --- internal/server/openvpn.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/server/openvpn.go b/internal/server/openvpn.go index aae40d540..f4bcf0830 100644 --- a/internal/server/openvpn.go +++ b/internal/server/openvpn.go @@ -155,11 +155,6 @@ func (h *openvpnHandler) setPortForwarded(w http.ResponseWriter, r *http.Request return } - if len(data.Ports) == 0 { - http.Error(w, "no port specified", http.StatusBadRequest) - return - } - if err := h.pf.SetPortsForwarded(data.Ports); err != nil { h.warner.Warn(fmt.Sprintf("failed setting forwarded ports: %s", err)) http.Error(w, "failed setting forwarded ports", http.StatusInternalServerError)