@@ -10,22 +10,26 @@ import (
1010
1111// Configuration Options that can be set by Command Line Flag, or Config File
1212type Options struct {
13− HttpAddress string `flag:"http-address" cfg:"http_address"`
14− RedirectUrl string `flag:"redirect-url" cfg:"redirect_url"`
15− ClientID string `flag:"client-id" cfg:"client_id" env:"GOOGLE_AUTH_PROXY_CLIENT_ID"`
16− ClientSecret string `flag:"client-secret" cfg:"client_secret" env:"GOOGLE_AUTH_PROXY_CLIENT_SECRET"`
17− PassBasicAuth bool `flag:"pass-basic-auth" cfg:"pass_basic_auth"`
18− HtpasswdFile string `flag:"htpasswd-file" cfg:"htpasswd_file"`
19− DisplayHtpasswdForm bool `flag:"display-htpasswd-form" cfg:"display_htpasswd_form"`
20− CookieSecret string `flag:"cookie-secret" cfg:"cookie_secret" env:"GOOGLE_AUTH_PROXY_COOKIE_SECRET"`
21− CookieDomain string `flag:"cookie-domain" cfg:"cookie_domain" env:"GOOGLE_AUTH_PROXY_COOKIE_DOMAIN"`
22− CookieExpire time.Duration `flag:"cookie-expire" cfg:"cookie_expire" env:"GOOGLE_AUTH_PROXY_COOKIE_EXPIRE"`
23− CookieHttpsOnly bool `flag:"cookie-https-only" cfg:"cookie_https_only"`
24− CookieHttpOnly bool `flag:"cookie-httponly" cfg:"cookie_httponly"`
25− AuthenticatedEmailsFile string `flag:"authenticated-emails-file" cfg:"authenticated_emails_file"`
26− GoogleAppsDomains []string `flag:"google-apps-domain" cfg:"google_apps_domains"`
27− Upstreams []string `flag:"upstream" cfg:"upstreams"`
28− SkipAuthRegex []string `flag:"skip-auth-regex" cfg:"skip_auth_regex"`
13+ HttpAddress string `flag:"http-address" cfg:"http_address"`
14+ RedirectUrl string `flag:"redirect-url" cfg:"redirect_url"`
15+ ClientID string `flag:"client-id" cfg:"client_id" env:"GOOGLE_AUTH_PROXY_CLIENT_ID"`
16+ ClientSecret string `flag:"client-secret" cfg:"client_secret" env:"GOOGLE_AUTH_PROXY_CLIENT_SECRET"`
17+
18+ AuthenticatedEmailsFile string `flag:"authenticated-emails-file" cfg:"authenticated_emails_file"`
19+ GoogleAppsDomains []string `flag:"google-apps-domain" cfg:"google_apps_domains"`
20+ HtpasswdFile string `flag:"htpasswd-file" cfg:"htpasswd_file"`
21+ DisplayHtpasswdForm bool `flag:"display-htpasswd-form" cfg:"display_htpasswd_form"`
22+
23+ CookieSecret string `flag:"cookie-secret" cfg:"cookie_secret" env:"GOOGLE_AUTH_PROXY_COOKIE_SECRET"`
24+ CookieDomain string `flag:"cookie-domain" cfg:"cookie_domain" env:"GOOGLE_AUTH_PROXY_COOKIE_DOMAIN"`
25+ CookieExpire time.Duration `flag:"cookie-expire" cfg:"cookie_expire" env:"GOOGLE_AUTH_PROXY_COOKIE_EXPIRE"`
26+ CookieHttpsOnly bool `flag:"cookie-https-only" cfg:"cookie_https_only"`
27+ CookieHttpOnly bool `flag:"cookie-httponly" cfg:"cookie_httponly"`
28+
29+ Upstreams []string `flag:"upstream" cfg:"upstreams"`
30+ SkipAuthRegex []string `flag:"skip-auth-regex" cfg:"skip_auth_regex"`
31+ PassBasicAuth bool `flag:"pass-basic-auth" cfg:"pass_basic_auth"`
32+ PassHostHeader bool `flag:"pass-host-header" cfg:"pass_host_header"`
2933
3034 // internal values that are set after config validation
3135 redirectUrl *url.URL
@@ -39,8 +43,9 @@ func NewOptions() *Options {
3943 DisplayHtpasswdForm: true,
4044 CookieHttpsOnly: true,
4145 CookieHttpOnly: true,
42− PassBasicAuth: true,
4346 CookieExpire: time.Duration(168) * time.Hour,
47+ PassBasicAuth: true,
48+ PassHostHeader: true,
4449 }
4550}
4651