@@ -177,9 +177,9 @@ func ValidateUrl(c *cli.Context, allowURLFromArgs bool) (*url.URL, error) {
177177}
178178
179179type UnvalidatedIngressRule struct {
180- Hostname string `json:"hostname"`
181- Path string `json:"path"`
182- Service string `json:"service"`
180+ Hostname string `json:"hostname,omitempty "`
181+ Path string `json:"path,omitempty "`
182+ Service string `json:"service,omitempty "`
183183 OriginRequest OriginRequestConfig `yaml:"originRequest" json:"originRequest"`
184184}
185185
@@ -192,41 +192,41 @@ type UnvalidatedIngressRule struct {
192192// - To specify a time.Duration in json, use int64 of the nanoseconds
193193type OriginRequestConfig struct {
194194 // HTTP proxy timeout for establishing a new connection
195- ConnectTimeout * CustomDuration `yaml:"connectTimeout" json:"connectTimeout"`
195+ ConnectTimeout * CustomDuration `yaml:"connectTimeout" json:"connectTimeout,omitempty "`
196196 // HTTP proxy timeout for completing a TLS handshake
197- TLSTimeout * CustomDuration `yaml:"tlsTimeout" json:"tlsTimeout"`
197+ TLSTimeout * CustomDuration `yaml:"tlsTimeout" json:"tlsTimeout,omitempty "`
198198 // HTTP proxy TCP keepalive duration
199- TCPKeepAlive * CustomDuration `yaml:"tcpKeepAlive" json:"tcpKeepAlive"`
199+ TCPKeepAlive * CustomDuration `yaml:"tcpKeepAlive" json:"tcpKeepAlive,omitempty "`
200200 // HTTP proxy should disable "happy eyeballs" for IPv4/v6 fallback
201- NoHappyEyeballs * bool `yaml:"noHappyEyeballs" json:"noHappyEyeballs"`
201+ NoHappyEyeballs * bool `yaml:"noHappyEyeballs" json:"noHappyEyeballs,omitempty "`
202202 // HTTP proxy maximum keepalive connection pool size
203- KeepAliveConnections * int `yaml:"keepAliveConnections" json:"keepAliveConnections"`
203+ KeepAliveConnections * int `yaml:"keepAliveConnections" json:"keepAliveConnections,omitempty "`
204204 // HTTP proxy timeout for closing an idle connection
205- KeepAliveTimeout * CustomDuration `yaml:"keepAliveTimeout" json:"keepAliveTimeout"`
205+ KeepAliveTimeout * CustomDuration `yaml:"keepAliveTimeout" json:"keepAliveTimeout,omitempty "`
206206 // Sets the HTTP Host header for the local webserver.
207- HTTPHostHeader * string `yaml:"httpHostHeader" json:"httpHostHeader"`
207+ HTTPHostHeader * string `yaml:"httpHostHeader" json:"httpHostHeader,omitempty "`
208208 // Hostname on the origin server certificate.
209- OriginServerName * string `yaml:"originServerName" json:"originServerName"`
209+ OriginServerName * string `yaml:"originServerName" json:"originServerName,omitempty "`
210210 // Path to the CA for the certificate of your origin.
211211 // This option should be used only if your certificate is not signed by Cloudflare.
212- CAPool * string `yaml:"caPool" json:"caPool"`
212+ CAPool * string `yaml:"caPool" json:"caPool,omitempty "`
213213 // Disables TLS verification of the certificate presented by your origin.
214214 // Will allow any certificate from the origin to be accepted.
215215 // Note: The connection from your machine to Cloudflare's Edge is still encrypted.
216- NoTLSVerify * bool `yaml:"noTLSVerify" json:"noTLSVerify"`
216+ NoTLSVerify * bool `yaml:"noTLSVerify" json:"noTLSVerify,omitempty "`
217217 // Disables chunked transfer encoding.
218218 // Useful if you are running a WSGI server.
219- DisableChunkedEncoding * bool `yaml:"disableChunkedEncoding" json:"disableChunkedEncoding"`
219+ DisableChunkedEncoding * bool `yaml:"disableChunkedEncoding" json:"disableChunkedEncoding,omitempty "`
220220 // Runs as jump host
221- BastionMode * bool `yaml:"bastionMode" json:"bastionMode"`
221+ BastionMode * bool `yaml:"bastionMode" json:"bastionMode,omitempty "`
222222 // Listen address for the proxy.
223- ProxyAddress * string `yaml:"proxyAddress" json:"proxyAddress"`
223+ ProxyAddress * string `yaml:"proxyAddress" json:"proxyAddress,omitempty "`
224224 // Listen port for the proxy.
225- ProxyPort * uint `yaml:"proxyPort" json:"proxyPort"`
225+ ProxyPort * uint `yaml:"proxyPort" json:"proxyPort,omitempty "`
226226 // Valid options are 'socks' or empty.
227- ProxyType * string `yaml:"proxyType" json:"proxyType"`
227+ ProxyType * string `yaml:"proxyType" json:"proxyType,omitempty "`
228228 // IP rules for the proxy service
229- IPRules []IngressIPRule `yaml:"ipRules" json:"ipRules"`
229+ IPRules []IngressIPRule `yaml:"ipRules" json:"ipRules,omitempty "`
230230}
231231
232232type IngressIPRule struct {
0 commit comments