Skip to content

Commit

Permalink
Mark unmarshallable yaml struct tags as ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Oct 24, 2023
1 parent 98a5237 commit d9e729b
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d9e729b

Please sign in to comment.