Add Content-Length header to preflight response
This commit is contained in:
parent
e3caaf0791
commit
545f2feacc
2 changed files with 6 additions and 0 deletions
|
@ -134,6 +134,7 @@ func TestNewHeader_CORSPreflights(t *testing.T) {
|
|||
"Origin": {"https://foo.bar.org"},
|
||||
},
|
||||
expected: map[string][]string{
|
||||
"Content-Length": {"0"},
|
||||
"Access-Control-Allow-Origin": {"https://foo.bar.org"},
|
||||
"Access-Control-Max-Age": {"600"},
|
||||
"Access-Control-Allow-Methods": {"GET,OPTIONS,PUT"},
|
||||
|
@ -152,6 +153,7 @@ func TestNewHeader_CORSPreflights(t *testing.T) {
|
|||
"Origin": {"https://foo.bar.org"},
|
||||
},
|
||||
expected: map[string][]string{
|
||||
"Content-Length": {"0"},
|
||||
"Access-Control-Allow-Origin": {"*"},
|
||||
"Access-Control-Max-Age": {"600"},
|
||||
"Access-Control-Allow-Methods": {"GET,OPTIONS,PUT"},
|
||||
|
@ -171,6 +173,7 @@ func TestNewHeader_CORSPreflights(t *testing.T) {
|
|||
"Origin": {"https://foo.bar.org"},
|
||||
},
|
||||
expected: map[string][]string{
|
||||
"Content-Length": {"0"},
|
||||
"Access-Control-Allow-Origin": {"*"},
|
||||
"Access-Control-Max-Age": {"600"},
|
||||
"Access-Control-Allow-Methods": {"GET,OPTIONS,PUT"},
|
||||
|
@ -191,6 +194,7 @@ func TestNewHeader_CORSPreflights(t *testing.T) {
|
|||
"Origin": {"https://foo.bar.org"},
|
||||
},
|
||||
expected: map[string][]string{
|
||||
"Content-Length": {"0"},
|
||||
"Access-Control-Allow-Origin": {"*"},
|
||||
"Access-Control-Max-Age": {"600"},
|
||||
"Access-Control-Allow-Methods": {"GET,OPTIONS,PUT"},
|
||||
|
@ -210,6 +214,7 @@ func TestNewHeader_CORSPreflights(t *testing.T) {
|
|||
"Origin": {"https://foo.bar.org"},
|
||||
},
|
||||
expected: map[string][]string{
|
||||
"Content-Length": {"0"},
|
||||
"Access-Control-Allow-Origin": {"*"},
|
||||
"Access-Control-Max-Age": {"600"},
|
||||
"Access-Control-Allow-Methods": {"GET,OPTIONS,PUT"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue