Skip to content

Commit

Permalink
adding markdown docs and config load test
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronhurt committed Jan 26, 2018
1 parent c12b57a commit bb7e2b0
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
21 changes: 21 additions & 0 deletions config/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,27 @@ func TestLoad(t *testing.T) {
return cfg
},
},
{
args: []string{"-proxy.header.sts.maxage", "31536000"},
cfg: func(cfg *Config) *Config {
cfg.Proxy.STSHeader.MaxAge = 31536000
return cfg
},
},
{
args: []string{"-proxy.header.sts.subdomains", "true"},
cfg: func(cfg *Config) *Config {
cfg.Proxy.STSHeader.Subdomains = true
return cfg
},
},
{
args: []string{"-proxy.header.sts.preload", "true"},
cfg: func(cfg *Config) *Config {
cfg.Proxy.STSHeader.Preload = true
return cfg
},
},
{
args: []string{"-proxy.gzip.contenttype", `^text/.*$`},
cfg: func(cfg *Config) *Config {
Expand Down
11 changes: 11 additions & 0 deletions docs/content/ref/proxy.header.sts.maxage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "proxy.header.sts.maxage"
---

`proxy.header.sts.maxage` enables and configures the max-age of HSTS for TLS requests.
When set greater than zero this enables the Strict-Transport-Security header
and sets the max-age value in the header.

The default is

proxy.header.sts.maxage = 0
17 changes: 17 additions & 0 deletions docs/content/ref/proxy.header.sts.preload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "proxy.header.sts.preload"
---

`proxy.header.sts.preload` instructs HSTS to include the preload directive.
When set to true, the 'preload' option will be added to the
Strict-Transport-Security header.

Sending the preload directive from your site can have PERMANENT CONSEQUENCES
and prevent users from accessing your site and any of its subdomains if you
find you need to switch back to HTTP. Please read the details at
[https://hstspreload.org/#removal](https://hstspreload.org/#removal)
before sending the header with "preload".

The default is

proxy.header.sts.preload = false
11 changes: 11 additions & 0 deletions docs/content/ref/proxy.header.sts.subdomains.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "proxy.header.sts.subdomains"
---

`proxy.header.sts.subdomains` instructs HSTS to include subdomains.
When set to true, the 'includeSubDomains' option will be added to
the Strict-Transport-Security header.

The default is

proxy.header.sts.subdomains = false
2 changes: 1 addition & 1 deletion fabio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
# Sending the preload directive from your site can have PERMANENT CONSEQUENCES
# and prevent users from accessing your site and any of its subdomains if you
# find you need to switch back to HTTP. Please read the details at
# hstspreload.appspot.com/#removal before sending the header with "preload".
# https://hstspreload.org/#removal before sending the header with "preload".
#
# The default is
#
Expand Down

0 comments on commit bb7e2b0

Please sign in to comment.