-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow multiple signatures to be defined in your configuration file #1
Comments
Wouldn't this better be solved by using multiple per-env configs? https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-3.1 |
Yeah, that is the other way of doing it. It's just that we would have a lot of extra configurations and each load balanced node would need their own configuration. This would also mean a configuration for each developer for their own local webhook... |
Currently this is the only setting that would necessitate all these extra environment configurations in our current project,.. I'd be more inclined to keep the signature handler we have instead of using the new one to avoid all these extra environment configs. |
Thanks for the explanation! I understand your arguments but it is the best practice to do it that way. That's exactly what the env-configs are meant for. If it's easier for you to do it differently then go ahead but I don't think it's a good idea to include the aforementioned functionality in this package. Therefore, I'd close the issue now. If you disagree, feel free to reopen this issue and add more comments. |
Sounds good, thanks for taking a look. |
Motivation
Webhooks in Kentico Kontent can only define one secret webhook key per URL. As such we have had to make multiple end point definitions in dev / test. In addition due to the issue of no distributed caching ability we have had to make multiple webhook endpoints to identify each node of a load balanced cluster.
This necessitates multiple webhook secrets to be defined in a configuration file.
Here is an example:
Proposed solution
We solved this by allowing multiple webhook secrets to be defined as follows:
Easy fix would be to do the same thing, and make your WebhookOptions model be an array of strings so you could define them in a config file as follows:
The text was updated successfully, but these errors were encountered: