Skip to content

Commit 2148ec3

Browse files
committed
change to redisUrl
1 parent f19b3a1 commit 2148ec3

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

spec/RateLimit.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ describe('rate limit', () => {
401401
requestCount: 1,
402402
errorResponseMessage: 'Too many requests',
403403
includeInternalRequests: true,
404-
redisURL: 'redis://localhost:6379',
404+
redisUrl: 'redis://localhost:6379',
405405
},
406406
],
407407
});

src/Options/Definitions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This code has been generated by resources/buildConfigDefinitions.js
44
Do not edit manually, but update Options/index.js
55
*/
66
var parsers = require('./parsers');
7+
78
module.exports.SchemaOptions = {
89
afterMigration: {
910
env: 'PARSE_SERVER_SCHEMA_AFTER_MIGRATION',
@@ -557,7 +558,7 @@ module.exports.RateLimitOptions = {
557558
action: parsers.booleanParser,
558559
default: false,
559560
},
560-
redisURL: {
561+
redisUrl: {
561562
env: 'PARSE_SERVER_RATE_LIMIT_REDIS_URL',
562563
help:
563564
'Optional, the URL of the Redis server to store rate limit data. This allows to rate limit requests for multiple servers by calculating the sum of all requests across all servers. This is useful if multiple servers are processing requests behind a load balancer. For example, the limit of 10 requests is reached if each of 2 servers processed 5 requests.',

src/Options/docs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Options/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export interface RateLimitOptions {
322322
includeInternalRequests: ?boolean;
323323
/* Optional, the URL of the Redis server to store rate limit data. This allows to rate limit requests for multiple servers by calculating the sum of all requests across all servers. This is useful if multiple servers are processing requests behind a load balancer. For example, the limit of 10 requests is reached if each of 2 servers processed 5 requests.
324324
*/
325-
redisURL: ?string;
325+
redisUrl: ?string;
326326
}
327327

328328
export interface SecurityOptions {

src/middlewares.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ export const addRateLimit = (route, config) => {
483483
store: null,
484484
connected: false,
485485
};
486-
if (route.redisURL) {
486+
if (route.redisrUrl) {
487487
const client = createClient({
488-
url: route.redisURL,
488+
url: route.redisrUrl,
489489
});
490490
redisStore.connectionPromise = async () => {
491491
if (redisStore.connected) {

0 commit comments

Comments
 (0)