@@ -8,11 +8,11 @@ type Upstreams []Upstream
88type Upstream struct {
99 // ID should be a unique identifier for the upstream.
1010 // This value is required for all upstreams.
11− ID string `json:"id"`
11+ ID string `json:"id,omitempty"`
1212
1313 // Path is used to map requests to the upstream server.
1414 // The closest match will take precedence and all Paths must be unique.
15− Path string `json:"path"`
15+ Path string `json:"path,omitempty"`
1616
1717 // The URI of the upstream server. This may be an HTTP(S) server of a File
1818 // based URL. It may include a path, in which case all requests will be served
@@ -24,19 +24,19 @@ type Upstream struct {
2424 // - file://host/path
2525 // If the URI's path is "/base" and the incoming request was for "/dir",
2626 // the upstream request will be for "/base/dir".
27− URI string `json:"uri"`
27+ URI string `json:"uri,omitempty"`
2828
2929 // InsecureSkipTLSVerify will skip TLS verification of upstream HTTPS hosts.
3030 // This option is insecure and will allow potential Man-In-The-Middle attacks
3131 // betweem OAuth2 Proxy and the usptream server.
3232 // Defaults to false.
33− InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify"`
33+ InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
3434
3535 // Static will make all requests to this upstream have a static response.
3636 // The response will have a body of "Authenticated" and a response code
3737 // matching StaticCode.
3838 // If StaticCode is not set, the response will return a 200 response.
39− Static bool `json:"static"`
39+ Static bool `json:"static,omitempty"`
4040
4141 // StaticCode determines the response code for the Static response.
4242 // This option can only be used with Static enabled.
@@ -50,9 +50,9 @@ type Upstream struct {
5050 // PassHostHeader determines whether the request host header should be proxied
5151 // to the upstream server.
5252 // Defaults to true.
53− PassHostHeader *bool `json:"passHostHeader"`
53+ PassHostHeader *bool `json:"passHostHeader,omitempty"`
5454
5555 // ProxyWebSockets enables proxying of websockets to upstream servers
5656 // Defaults to true.
57− ProxyWebSockets *bool `json:"proxyWebSockets"`
57+ ProxyWebSockets *bool `json:"proxyWebSockets,omitempty"`
5858}