Skip to content

Commit

Permalink
Merge pull request #1571 from aledbf/fix-tests
Browse files Browse the repository at this point in the history
Fix cors tests
  • Loading branch information
aledbf authored Oct 22, 2017
2 parents e2790c8 + e908338 commit 10c594f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/ingress/controller/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const (
sessionAffinity = "SessionAffinity"
serviceUpstream = "ServiceUpstream"
serverAlias = "Alias"
enableCors = "EnableCORS"
corsConfig = "CorsConfig"
clientBodyBufferSize = "ClientBodyBufferSize"
certificateAuth = "CertificateAuth"
serverSnippet = "ServerSnippet"
Expand Down Expand Up @@ -177,7 +177,7 @@ func (e *annotationExtractor) SessionAffinity(ing *extensions.Ingress) *sessiona
}

func (e *annotationExtractor) Cors(ing *extensions.Ingress) *cors.CorsConfig {
val, _ := e.annotations[enableCors].Parse(ing)
val, _ := e.annotations[corsConfig].Parse(ing)
return val.(*cors.CorsConfig)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ingress/controller/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestMergeLocationAnnotations(t *testing.T) {
"Backend": "foo_backend",
"BasicDigestAuth": auth.BasicDigest{},
DeniedKeyName: &fakeError{},
"EnableCORS": cors.CorsConfig{},
"CorsConfig": cors.CorsConfig{},
"ExternalAuth": authreq.External{},
"RateLimit": ratelimit.RateLimit{},
"Redirect": redirect.Redirect{},
Expand Down

0 comments on commit 10c594f

Please sign in to comment.