Skip to content

Commit

Permalink
allow setting NO port forwards => clears forwarded ports
Browse files Browse the repository at this point in the history
  • Loading branch information
jagaimoworks committed Nov 29, 2024
1 parent 32a7f1f commit 3b633e4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/server/openvpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3b633e4

Please sign in to comment.