问题
I'm using ASP.NET ImageResizer library, I have my application working well.
But I came across two problems, first is single ip requesting many images like:
image.jpeg?width=10
image.jpeg?width=11
image.jpeg?width=12
image.jpeg?width=13
But this I simply resolve alowing X request per minute.
My second problem is that I dont want to create ALL images, I want breakpoints, somethig like:
1º - 320w- 213h
2º - 453w- 302h
3º - 579w- 386h
4º - 687w- 458h
5º - 786w- 524h
... This table I get from this great article.
My question is can I do it with ImageResizer library configurations, or do I have to work around to overtake this problem?
回答1:
ImageResizer offers "Presets", and you can lock it down so only presets can be used. These are typically used to create breakpoints as you describe.
If you have attackers, there are many IPS systems that can detect malicious attacks based on pattern and block them. CloudFlare is also good at this.
来源:https://stackoverflow.com/questions/35455616/image-resizer-creating-breakpoints