Repository navigation
|
Is it possible to view all images on a page in the proxy without having to parse through the website code for IMG tages and then download them separately and then view them? We are looking at tieing in an image filter as part of the proxy. |
Answered by
honfika
Mar 17, 2022
Replies: 2 comments
|
If the image is downloaded trough the proxy, then yes, it is possible. |
0 replies
Answer selected by
ltsz16
|
Yes ? if the browser loads images through the proxy, you'll see them as normal sessions. No need to scrape proxyServer.BeforeResponse += async (sender, e) =>
{
var contentType = e.HttpClient.Response.ContentType;
if (contentType == null || !contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase))
return;
var bytes = await e.GetResponseBody();
// run your image filter / save / block here
// e.SetResponseBody(modifiedBytes); // if you alter it
// or e.Ok(...) / custom 403 if you want to block
};Also useful: in Closing this out. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the image is downloaded trough the proxy, then yes, it is possible.