Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DCSG2900-ThreatTotal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Barstad
DCSG2900-ThreatTotal
Commits
1ccebfbe
Commit
1ccebfbe
authored
May 9, 2022
by
Jonas Kjærandsen
Browse files
Options
Downloads
Patches
Plain Diff
Commenting of filter functionality
parent
7c6b32b9
No related branches found
No related tags found
1 merge request
!2
Merge react-branch into main.
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/url-intelligence.go
+3
-0
3 additions, 0 deletions
api/url-intelligence.go
with
3 additions
and
0 deletions
api/url-intelligence.go
+
3
−
0
View file @
1ccebfbe
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment