Skip to content

feat(configx): allow exceptions in immutables#713

Merged
zepatrik merged 3 commits intomasterfrom
feat/configx/cors-hot-reload
Aug 10, 2023
Merged

feat(configx): allow exceptions in immutables#713
zepatrik merged 3 commits intomasterfrom
feat/configx/cors-hot-reload

Conversation

@zepatrik
Copy link
Copy Markdown
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.

// })
// // ...
//
// Deprecated: because this is not really practical to use, you should use CheckOrigin as the cors.Options.AllowOriginRequestFunc instead.
Copy link
Copy Markdown
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