Skip to content

Commit

Permalink
Fix for url with no http header
Browse files Browse the repository at this point in the history
  • Loading branch information
LenaigKaliou committed Dec 11, 2024
1 parent 7a12573 commit bc460dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cisco/cisco-esa/ingest/parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ stages:
{%- endfor %}]
cisco.esa.url_domain: >-
[{% for url, details in json_event_url_details.message.items() %}
{% if details.get('ExpandedUrl') is not none %}"{{url.split('/')[2]}}", "{{ details.ExpandedUrl.split('/')[2] }}"{% else %}"{{ url.split('/')[2] }}"{% endif %}
{% if details.get('ExpandedUrl') is not none %}"{{url.replace('https://','').replace('http://','').split('/')[0]}}", "{{ details.ExpandedUrl.replace('https://','').replace('http://','').split('/')[0] }}"{% else %}"{{ url.replace('https://','').replace('http://','').split('/')[0] }}"{% endif %}
{% if not loop.last %},{% endif %}
{% endfor %}]
cisco.esa.url: >-
Expand Down
4 changes: 2 additions & 2 deletions Cisco/cisco-esa/tests/test_ingest_log5.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
"www.twitter.com"
],
"url_domain": [
"",
"facebook.com",
"tiktok.com",
"tinyurl.es"
"tinyurl.es",
"www.twitter.com"
]
}
},
Expand Down

0 comments on commit bc460dc

Please sign in to comment.