Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eventindexer): remove redundant opts.CorsOrigins check #17306

Merged
merged 8 commits into from
Aug 30, 2024

Conversation

ddl-hust
Copy link
Contributor

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.

@ddl-hust ddl-hust changed the title fix(eventindexer):remove redundant opts.CorsOrigins check fix(eventindexer): remove redundant opts.CorsOrigins check May 23, 2024
@cyberhorsey
Copy link
Contributor

LGTM!

@dantaik dantaik enabled auto-merge August 30, 2024 03:12
@davidtaikocha davidtaikocha merged commit d025599 into taikoxyz:main Aug 30, 2024
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants