diff --git a/config.go b/config.go index f14860d..bb42020 100644 --- a/config.go +++ b/config.go @@ -45,9 +45,10 @@ type Config struct { // Default value is [] AllowOrigins []string - // AllowOriginFunc is a custom function to validate the origin. It take the origin - // as argument and returns true if allowed or false otherwise. If this option is - // set, the content of AllowOrigins is ignored. + // AllowOriginFunc is a custom function to validate the origin. It takes the origin + // as argument and returns true if allowed or false otherwise. + // AllowOrigins have a higher AllowOrigins have a higher priority than AllowOriginFunc + // It is recommended to use AllowOriginFunc without setting AllowOrigins. AllowOriginFunc func(origin string) bool // AllowMethods is a list of methods the client is allowed to use with