Skip to content

Commit 69a0de8

Browse files
authoredOct 24, 2023
Mark unmarshallable yaml struct tags as ignored (#2536)
1 parent 98a5237 commit 69a0de8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎middleware/cors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type (
3939
// See https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
4040
//
4141
// Optional.
42-
AllowOriginFunc func(origin string) (bool, error) `yaml:"allow_origin_func"`
42+
AllowOriginFunc func(origin string) (bool, error) `yaml:"-"`
4343

4444
// AllowMethods determines the value of the Access-Control-Allow-Methods
4545
// response header. This header specified the list of methods allowed when

‎middleware/rewrite.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type (
2727
// Example:
2828
// "^/old/[0.9]+/": "/new",
2929
// "^/api/.+?/(.*)": "/v2/$1",
30-
RegexRules map[*regexp.Regexp]string `yaml:"regex_rules"`
30+
RegexRules map[*regexp.Regexp]string `yaml:"-"`
3131
}
3232
)
3333

0 commit comments

Comments
 (0)
Please sign in to comment.