-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Feat/#issue284 #325
base: main
Are you sure you want to change the base?
Feat/#issue284 #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work 🙏🏼
Please write a tests that shows that it works. You can also update the tests that are about the cors middleware.
And please update the PR title to something meaningful lol.
server.go
Outdated
} | ||
} | ||
|
||
// WithCorsMiddleware is deprecated: Use WithGlobalMiddleware instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same syntax than all other deprecated notices, the one understood by Go editors and godoc : skip line then write Deprecated: xxx
.
Also, please reference [WithGlobalMiddlewares]
with brackets so it can be recognized by other Go tools like Godoc :)
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why such a change?
You could add a commit if it's about formatting files
server.go
Outdated
// For example, it allows OPTIONS /foo even if it is not declared (only GET /foo is declared). | ||
corsMiddleware func(http.Handler) http.Handler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still need this then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, as it is not exposed, we can remove it, no need for deprecation notice!
refactor: replace WithCorsMiddleware by WithGlobalMiddleware