Fix cors tests
This commit is contained in:
parent
e2790c8f6f
commit
e9083383ff
2 changed files with 3 additions and 3 deletions
|
@ -130,7 +130,7 @@ const (
|
|||
sessionAffinity = "SessionAffinity"
|
||||
serviceUpstream = "ServiceUpstream"
|
||||
serverAlias = "Alias"
|
||||
enableCors = "EnableCORS"
|
||||
corsConfig = "CorsConfig"
|
||||
clientBodyBufferSize = "ClientBodyBufferSize"
|
||||
certificateAuth = "CertificateAuth"
|
||||
serverSnippet = "ServerSnippet"
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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{},
|
||||
|
|
Loading…
Reference in a new issue