File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ type cors struct {
14
14
allowedHeaders []string
15
15
allowedMethods []string
16
16
allowedOrigins []string
17
- allowedOriginValidator originValidator
17
+ allowedOriginValidator OriginValidator
18
18
exposedHeaders []string
19
19
maxAge int
20
20
ignoreOptions bool
21
21
allowCredentials bool
22
22
}
23
23
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
26
26
27
27
var (
28
28
defaultCorsMethods = []string {"GET" , "HEAD" , "POST" }
@@ -224,7 +224,7 @@ func AllowedOrigins(origins []string) CORSOption {
224
224
225
225
// AllowedOriginValidator sets a function for evaluating allowed origins in CORS requests, represented by the
226
226
// 'Allow-Access-Control-Origin' HTTP header.
227
- func AllowedOriginValidator (fn originValidator ) CORSOption {
227
+ func AllowedOriginValidator (fn OriginValidator ) CORSOption {
228
228
return func (ch * cors ) error {
229
229
ch .allowedOriginValidator = fn
230
230
return nil
You can’t perform that action at this time.
0 commit comments