tomsun28 commented on code in PR #3365:
URL: https://github.com/apache/hertzbeat/pull/3365#discussion_r2094438800
##########
hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/notice/impl/GotifyAlertNotifyHandlerImpl.java:
##########
@@ -104,4 +109,19 @@ public static class ClientDisplay {
}
}
+
+ /**
+ * Validate the webhook URL against a whitelist of allowed base URLs.
+ *
+ * @param url the webhook URL to validate
+ * @return true if the URL is valid, false otherwise
+ */
+ private boolean isValidWebhookUrl(String url) {
+ // Define a whitelist of allowed base URLs
+ List<String> allowedBaseUrls = List.of(
+ "https://trusted-gotify-server.com",
+ "https://another-trusted-server.com"
Review Comment:
Gotify is self-hosted server, can not valid url.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]