meilisearch / scrapix

MIT License
21 stars 9 forks source link

Add webhook_url as a config option #70

Closed bidoubiwa closed 1 year ago

bidoubiwa commented 1 year ago

Having only one WEBHOOK_URL provided by an environment variable brought to many limitations.

The cloud is using scrapix through a lambda, ENV variables in lambda must be set on create or update. They cannot be changed when they are invoked.

This led to not being able to change the webhook URL to cloud.meilisearch.dev or .com depending on the environment.

Additionally, having the webhook_url as an option provides the possibility to create a dedicated route for a dedicated project and index.

for example

/v1/api/v1/projects/:projectId/indexes/:index/webhook

Which means we do not have to pass the information of the project id and the index through the webhook_payload configuration.

New configuration:

wehbook_url: "myurl.com"