mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-30 17:37:25 +02:00
core/config: disable strict-transport-security header with staging autocert (#4741)
This commit is contained in:
parent
3ad72db2fb
commit
cfc339548f
2 changed files with 10 additions and 1 deletions
|
@ -979,6 +979,15 @@ func TestOptions_GetSetResponseHeaders(t *testing.T) {
|
|||
"X-XSS-Protection": "1; mode=block",
|
||||
}, options.GetSetResponseHeaders())
|
||||
})
|
||||
t.Run("autocert-staging", func(t *testing.T) {
|
||||
options := NewDefaultOptions()
|
||||
options.Cert = "CERT"
|
||||
options.AutocertOptions.UseStaging = true
|
||||
assert.Equal(t, map[string]string{
|
||||
"X-Frame-Options": "SAMEORIGIN",
|
||||
"X-XSS-Protection": "1; mode=block",
|
||||
}, options.GetSetResponseHeaders())
|
||||
})
|
||||
t.Run("disable", func(t *testing.T) {
|
||||
options := NewDefaultOptions()
|
||||
options.SetResponseHeaders = map[string]string{DisableHeaderKey: "1", "x-other": "xyz"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue