Skip to content
Snippets Groups Projects
Commit 1ccebfbe authored by Jonas Kjærandsen's avatar Jonas Kjærandsen
Browse files

Commenting of filter functionality

parent 7c6b32b9
No related branches found
No related tags found
1 merge request!2Merge react-branch into main.
......@@ -140,6 +140,7 @@ func checkIfIntelligenceComplete(jsonData utils.ResultFrontendResponse, size int
return complete
}
// CheckUrlAgainstFilter function which returns false if an item is whitelisted
func checkUrlAgainstFilter(url string) bool {
for i := 0; i < len(utils.UrlBlockList); i++ {
if strings.Contains(url, utils.UrlBlockList[i]) {
......@@ -149,6 +150,8 @@ func checkUrlAgainstFilter(url string) bool {
return true
}
// Function which creates a safe response for the google api, used in combination
// with the filter to demo filter functionality
func giveTrueGoogleUrl(url string, response *utils.FrontendResponse2) {
response.EN.Status = "Safe"
response.EN.Content = "Google safebrowsing has no data that indicates this is an unsafe URL/Domain"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment