From 79970b08129cc38fb74166a5df60c757b62a428f Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 22 Apr 2022 11:13:34 +0200 Subject: [PATCH] add omitempty to proxy routes to slim down configuration example --- extensions/proxy/pkg/config/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/proxy/pkg/config/config.go b/extensions/proxy/pkg/config/config.go index a8c394f36c..c0d6ea4e8d 100644 --- a/extensions/proxy/pkg/config/config.go +++ b/extensions/proxy/pkg/config/config.go @@ -45,15 +45,15 @@ type Policy struct { // Route defines forwarding routes type Route struct { - Type RouteType `yaml:"type"` + Type RouteType `yaml:"type,omitempty"` // Method optionally limits the route to this HTTP method - Method string `yaml:"method"` - Endpoint string `yaml:"endpoint"` + Method string `yaml:"method,omitempty"` + Endpoint string `yaml:"endpoint,omitempty"` // Backend is a static URL to forward the request to - Backend string `yaml:"backend"` + Backend string `yaml:"backend,omitempty"` // Service name to look up in the registry - Service string `yaml:"service"` - ApacheVHost bool `yaml:"apache_vhost"` + Service string `yaml:"service,omitempty"` + ApacheVHost bool `yaml:"apache_vhost,omitempty"` } // RouteType defines the type of a route