File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ type cors struct {
1414 allowedHeaders []string
1515 allowedMethods []string
1616 allowedOrigins []string
17- allowedOriginValidator originValidator
17+ allowedOriginValidator OriginValidator
1818 exposedHeaders []string
1919 maxAge int
2020 ignoreOptions bool
2121 allowCredentials bool
2222}
2323
24- // originValidator takes an origin string and returns whether or not that origin is allowed.
25- type originValidator func (string ) bool
24+ // OriginValidator takes an origin string and returns whether or not that origin is allowed.
25+ type OriginValidator func (string ) bool
2626
2727var (
2828 defaultCorsMethods = []string {"GET" , "HEAD" , "POST" }
@@ -224,7 +224,7 @@ func AllowedOrigins(origins []string) CORSOption {
224224
225225// AllowedOriginValidator sets a function for evaluating allowed origins in CORS requests, represented by the
226226// 'Allow-Access-Control-Origin' HTTP header.
227- func AllowedOriginValidator (fn originValidator ) CORSOption {
227+ func AllowedOriginValidator (fn OriginValidator ) CORSOption {
228228 return func (ch * cors ) error {
229229 ch .allowedOriginValidator = fn
230230 return nil
You can’t perform that action at this time.
0 commit comments