hotfix(env): allow empty VPN_ENDPOINT_IP

This commit is contained in:
Quentin McGaw
2022-02-06 20:02:45 +00:00
parent fcab4ae3c6
commit 783fb38e41

View File

@@ -109,6 +109,10 @@ var (
func (r *Reader) readOpenVPNTargetIP() (ip net.IP, err error) {
envKey, s := r.getEnvWithRetro("VPN_ENDPOINT_IP", "OPENVPN_TARGET_IP")
if s == "" {
return nil, nil
}
ip = net.ParseIP(s)
if ip == nil {
return nil, fmt.Errorf("environment variable %s: %w: %s",