1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add support for HTTP Strict Transport Security header

This commit is contained in:
Frédéric Guillot 2018-02-03 15:54:02 -08:00
parent 9c42997209
commit 61bc012a62
4 changed files with 33 additions and 3 deletions

View file

@ -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") != ""}