I am using MITM proxy to inject javascript code to traffic passing through the proxy. For now I am checking content-type of header to be text/html, The problem I am facing is that on a single page there are multiple resources which have content-type as text/html so my javascript code is getting injected multiple times to the page.
How can I prevent this ?
Thanks in advance !