-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: PC-9592 Validate opsgenie and slack URLs at submission (#623)
## Motivation Described in [PC-9592 ](https://nobl9.atlassian.net/browse/PC-9592) ## Summary Added validation for opsgenie and slack URLs, the validation is the same as the validation in corresponding notifications services: * [opsgenie](https://github.com/nobl9/n9/blob/main/notifications/notificationsopsgenie/internal/notifier/notificationsopsgenie.go#L92) * [slack](https://github.com/nobl9/n9/blob/main/notifications/notificationsslack/internal/notifier/notificationsslack.go#L83) ## Related changes None ## Testing - Added unit tests ## Release Notes Improved URL validation for Opsgenie and Slack alert methods: * Slack URLs must now begin with `https://hooks.slack.com/services/`. * Opsgenie URLs must start with either `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`.
- Loading branch information
1 parent
a6eef55
commit 1080309
Showing
4 changed files
with
73 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters