Skip to content

Commit

Permalink
Mark unmarshallable yaml struct tags as ignored (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Oct 24, 2023
1 parent 98a5237 commit 69a0de8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion middleware/cors.go
Expand Up @@ -39,7 +39,7 @@ type (
// See https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
//
// Optional.
AllowOriginFunc func(origin string) (bool, error) `yaml:"allow_origin_func"`
AllowOriginFunc func(origin string) (bool, error) `yaml:"-"`

// AllowMethods determines the value of the Access-Control-Allow-Methods
// response header. This header specified the list of methods allowed when
Expand Down
2 changes: 1 addition & 1 deletion middleware/rewrite.go
Expand Up @@ -27,7 +27,7 @@ type (
// Example:
// "^/old/[0.9]+/": "/new",
// "^/api/.+?/(.*)": "/v2/$1",
RegexRules map[*regexp.Regexp]string `yaml:"regex_rules"`
RegexRules map[*regexp.Regexp]string `yaml:"-"`
}
)

Expand Down

0 comments on commit 69a0de8

Please sign in to comment.