From 23fd12c67db277593079a0403ac3ea96caffc375 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 10 Nov 2015 11:51:56 +0000 Subject: [PATCH] dropped throttle for full pdf download to 30 over 5 mins 1 download every 10 seconds which seems ample --- .../web/app/coffee/Features/Compile/CompileController.coffee | 2 +- .../UnitTests/coffee/Compile/CompileControllerTests.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index 83a0b3b4b7..e128a6fb24 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -58,7 +58,7 @@ module.exports = CompileController = else rateLimitOpts = endpointName: "full-pdf-download" - throttle: 50 + throttle: 30 rateLimitOpts.subjectName = req.ip rateLimitOpts.timeInterval = 60 * 5 diff --git a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee index d40d10e77c..7fddfec33d 100644 --- a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee @@ -138,7 +138,7 @@ describe "CompileController", -> @req.query = {} @RateLimiter.addCount.callsArgWith(1, null, true) @CompileController.proxyToClsi = (project_id, url)=> - @RateLimiter.addCount.args[0][0].throttle.should.equal 50 + @RateLimiter.addCount.args[0][0].throttle.should.equal 30 done() @CompileController.downloadPdf @req, @res @@ -147,7 +147,7 @@ describe "CompileController", -> @req.query = {pdfng:false} @RateLimiter.addCount.callsArgWith(1, null, true) @CompileController.proxyToClsi = (project_id, url)=> - @RateLimiter.addCount.args[0][0].throttle.should.equal 50 + @RateLimiter.addCount.args[0][0].throttle.should.equal 30 done() @CompileController.downloadPdf @req, @res