@@ -66,6 +66,7 @@ func main() {
6666 flagSet.String("htpasswd-file", "", "additionally authenticate against a htpasswd file. Entries must be created with \"htpasswd -s\" for SHA encryption or \"htpasswd -B\" for bcrypt encryption")
6767 flagSet.Bool("display-htpasswd-form", true, "display username / password login form if an htpasswd file is provided")
6868 flagSet.String("custom-templates-dir", "", "path to custom html templates")
69+ flagSet.String("banner", "", "custom banner string. Use \"-\" to disable default banner.")
6970 flagSet.String("footer", "", "custom footer string. Use \"-\" to disable default footer.")
7071 flagSet.String("proxy-prefix", "/oauth2", "the url root path that this proxy should be nested under (e.g. /<oauth2>/sign_in)")
7172 flagSet.Bool("proxy-websockets", true, "enables WebSocket proxying")
@@ -148,7 +149,13 @@ func main() {
148149 validator := NewValidator(opts.EmailDomains, opts.AuthenticatedEmailsFile)
149150 oauthproxy := NewOAuthProxy(opts, validator)
150151
151− if len(opts.EmailDomains) != 0 && opts.AuthenticatedEmailsFile == "" {
152+ if len(opts.Banner) >= 1 {
153+ if opts.Banner == "-" {
154+ oauthproxy.SignInMessage = ""
155+ } else {
156+ oauthproxy.SignInMessage = opts.Banner
157+ }
158+ } else if len(opts.EmailDomains) != 0 && opts.AuthenticatedEmailsFile == "" {
152159 if len(opts.EmailDomains) > 1 {
153160 oauthproxy.SignInMessage = fmt.Sprintf("Authenticate using one of the following domains: %v", strings.Join(opts.EmailDomains, ", "))
154161 } else if opts.EmailDomains[0] != "*" {