Small library that can be used to filter XMLHttpRequest based on the hostname.
- Need a way to find all http calls from third party javascript libraries
- Need to prevent unwanted http calls from javascript code.
- Add link to the html file
<script src="https://cdn.jsdelivr.net/gh/juztcode/[email protected]/src/http-filter.js"></script>
- Initialize with accepted hostname list and match type ('exact', 'partial')
<script>
HttpFilter([
'sample.com'
], 'exact');
</script>
- Thats it your http call will filter according to their hostname
Happy Coding :)