taiko-mono
taiko-mono copied to clipboard
fix(eventindexer): remove redundant opts.CorsOrigins check
there's a logical issue in the handling of corsOrigins: the Validate
method checks if opts.CorsOrigins
is nil, and if so, returns an error eventindexer.ErrNoCORSOrigins
. However, in the NewServer
method, even if opts.CorsOrigins
is nil, it's set to a default value of []string{"*"}.
cause the check in the Validate method is redundant, as the nil case is already handled in the NewServer method.