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(webapp): [nan-839] add secondary url #2135
Conversation
what's the purpose of a secondary webhook url? |
Request from customer https://nangohq.slack.com/archives/C05QZ7A2MPB/p1713926064382129 |
I personally don't think we should support this. Why can't the customer do the routing on their side. They still gonna need to have some logic to filter based on the connection. This filtering could route to their correct destination. |
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.
Works as intended (at least the UI and API) 🙏🏻
I think it's one of those ideas where it's super simple in theory and full of complexity in practice. In a cloud install, you will need 2 wehbooks url (one for your own staging and one for a dev) and maybe 3 because there are actually two devs and maybe 4 because you also need zapier, etc.
And there is no way to differentiate webhooks, so when a dev is playing the others url are also receiving stuff that might not exists on their own backend leading to bug or confusion.
Not easy, I think it kinda works like this so I'll approve after the few comments but it can only be a short-term solution imo
@@ -0,0 +1,11 @@ | |||
exports.up = async function (knex, _) { | |||
return knex.schema.alterTable('_nango_environments', function (table) { | |||
table.text('webhook_url_secondary'); |
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.
I think I would make it an array, because if we have 2 why not three or more
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.
Fair, but the goal was to limit this to two.
Thanks @TBonnin -- understand your perspective here. |
Describe your changes
Add the ability to add a secondary webhook url. I purposely treated it as a another column to reduce complexity and to set a hard limit of the number of webhooks we allow customers to send to. Two should be the max IMO.
Also fixes environment name instead of the incorrect
account
Issue ticket number and link
NAN-839
Checklist before requesting a review (skip if just adding/editing APIs & templates)