diff options
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 05b5d3b..9bd673e 100644 --- a/config/config.go +++ b/config/config.go @@ -167,6 +167,11 @@ func (c *Config) OAuth2Provider() string { return c.get("OAUTH2_PROVIDER", "") } +// HasHSTS returns true if HTTP Strict Transport Security is enabled. +func (c *Config) HasHSTS() bool { + return c.get("DISABLE_HSTS", "") == "" +} + // NewConfig returns a new Config. func NewConfig() *Config { return &Config{IsHTTPS: os.Getenv("HTTPS") != ""} |