aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
index 8b23a83..0bd0235 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
@@ -42,14 +42,22 @@ using OpenSim.Framework.Servers.HttpServer;
42 42
43namespace OpenSim.Server.Handlers.Asset 43namespace OpenSim.Server.Handlers.Asset
44{ 44{
45 public class AssetServerGetHandler : BaseStreamHandler 45 public class AssetServerGetHandler : BaseStreamHandlerBasicDOSProtector
46 { 46 {
47 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private IAssetService m_AssetService; 49 private IAssetService m_AssetService;
50 50
51 public AssetServerGetHandler(IAssetService service) : 51 public AssetServerGetHandler(IAssetService service) :
52 base("GET", "/assets") 52 base("GET", "/assets",new BasicDosProtectorOptions()
53 {
54 AllowXForwardedFor = true,
55 ForgetTimeSpan = TimeSpan.FromSeconds(2),
56 MaxRequestsInTimeframe = 5,
57 ReportingName = "ASSETGETDOSPROTECTOR",
58 RequestTimeSpan = TimeSpan.FromSeconds(5),
59 ThrottledAction = ThrottleAction.DoThrottledMethod
60 })
53 { 61 {
54 m_AssetService = service; 62 m_AssetService = service;
55 } 63 }