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:
parent
9c42997209
commit
61bc012a62
4 changed files with 33 additions and 3 deletions
|
@ -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") != ""}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue