Skip to content

Commit

Permalink
BUG: fix missing cors-enable annotation treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmatmati authored and oktalz committed Apr 12, 2022
1 parent 5c5457e commit 6462c78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions controller/annotations/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func Frontend(i *store.Ingress, r *rules.Rules, m maps.MapFiles) []Annotation {
reqAuth.NewAnnotation("auth-secret"),
reqCapture.NewAnnotation("request-capture"),
reqCapture.NewAnnotation("request-capture-len"),
// always put cors-enable annotation before any oth
resSetCORS.NewAnnotation("cors-enable"),
resSetCORS.NewAnnotation("cors-allow-origin"),
resSetCORS.NewAnnotation("cors-allow-method"),
resSetCORS.NewAnnotation("cors-allow-headers"),
Expand Down
2 changes: 1 addition & 1 deletion controller/annotations/ingress/resSetCORS.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/haproxytech/kubernetes-ingress/controller/utils"
)

const corsVarName = "cors-origin"
const corsVarName = "cors_origin"

type ResSetCORS struct {
rules *rules.Rules
Expand Down

0 comments on commit 6462c78

Please sign in to comment.