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

feat(configx): allow exceptions in immutables #713

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

zepatrik
Copy link
Member

@zepatrik zepatrik commented Aug 8, 2023

This makes it possible to allow hot-reloading e.g. the CORS origins, while the rest of the serve key is not hot-reloadable.

@@ -19,6 +19,8 @@ import (
// panic("implement me")
// })
// // ...
//
// Deprecated: because this is not really practical to use, you should use CheckOrigin as the cors.Options.AllowOriginRequestFunc instead.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this was that the config has to come from the config provider, but where you initialize the middleware you have no access to the config.

@zepatrik zepatrik requested a review from aeneasr August 10, 2023 07:07
@zepatrik zepatrik merged commit 17527e9 into master Aug 10, 2023
@zepatrik zepatrik deleted the feat/configx/cors-hot-reload branch August 10, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants