本文介绍了图像缩放和QUOT;创建断点"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的 ASP.NET ImageResizer库的,我有我的应用程序运作良好。

I'm using ASP.NET ImageResizer library, I have my application working well.

但我遇到两个问题来了,首先是单一的IP请求许多的图像,例如:

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 

但是,这只是我解决alowing每分钟点¯x要求。

But this I simply resolve alowing X request per minute.

我的第二个问题是,我不希望创建的所有图像,我想断点,somethig这样的:

My second problem is that I dont want to create ALL images, I want breakpoints, somethig like:


  • 1° - 320w- 213H

  • 1º - 320w- 213h

2° - 453w- 302H

2º - 453w- 302h

3° - 579w- 386h

3º - 579w- 386h

4度 - 687w- 458h

4º - 687w- 458h

5° - 786w- 524h

5º - 786w- 524h

...
 此表我从这个得到。

我的问题是我能和ImageResizer库配置做,或做我必须解决超车这个问题?

My question is can I do it with ImageResizer library configurations, or do I have to work around to overtake this problem?

推荐答案

ImageResizer提供,你可以锁定下来所以只有preset中都可以使用。这些通常被用来作为你描述创建断点。

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.

如果您有攻击,有可以检测到基于模式的恶意攻击,并阻止他们许多IPS系统。 CloudFlare的也擅长此道。

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.

这篇关于图像缩放和QUOT;创建断点"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 18:33