Add support for custom proxy headers using a ConfigMap

This commit is contained in:
Manuel de Brito Fontes 2017-02-07 15:13:08 -03:00
parent 016f3a2bc7
commit 5cc5669938
5 changed files with 54 additions and 2 deletions

View file

@ -152,6 +152,9 @@ type Configuration struct {
// of your external load balancer
ProxyRealIPCIDR string `json:"proxy-real-ip-cidr,omitempty"`
// Sets the name of the configmap that contains the headers to pass to the backend
ProxySetHeaders string `json:"proxy-set-headers,omitempty"`
// Maximum size of the server names hash tables used in server names, map directives values,
// MIME types, names of request header strings, etcd.
// http://nginx.org/en/docs/hash.html
@ -283,6 +286,7 @@ func NewDefault() Configuration {
// TemplateConfig contains the nginx configuration to render the file nginx.conf
type TemplateConfig struct {
ProxySetHeaders map[string]string
MaxOpenFiles int
BacklogSize int
Backends []*ingress.Backend