Explorar el Código

fix an issue with rate limiting

jomo hace 4 años
padre
commit
ef4b2f8005
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/networking.js

+ 1 - 1
lib/networking.js

@@ -41,7 +41,7 @@ exp.resetCounter = function() {
 // callback: the body, response,
 // callback: the body, response,
 // and error buffer. get_from helper method is available
 // and error buffer. get_from helper method is available
 exp.get_from_options = function(rid, url, options, callback) {
 exp.get_from_options = function(rid, url, options, callback) {
-  var is_session_req = config.sessions_rate_limit && url.startsWith(session_url);
+  var is_session_req = config.server.sessions_rate_limit && url.startsWith(session_url);
 
 
   // This is to prevent being blocked by CloudFront for exceeding the rate limit
   // This is to prevent being blocked by CloudFront for exceeding the rate limit
   if (is_session_req && req_count() >= config.server.sessions_rate_limit) {
   if (is_session_req && req_count() >= config.server.sessions_rate_limit) {