Skip to content

Commit

Permalink
Merge pull request #1131 from OneSignal/dev/fix_low_rate_limit
Browse files Browse the repository at this point in the history
[Dev] fix low rate limit
  • Loading branch information
jkasten2 authored Nov 14, 2023
2 parents 36d42a9 + e431f12 commit f8df45e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions express_webpack/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const fs = require('fs');
var sanitize = require("sanitize-filename");

const app = express(),
DIST_DIR = __dirname,
HTML_FILE = path.join(DIST_DIR, 'index.html'),
SDK_FILES = path.join(DIST_DIR, '../build/releases/');
DIST_DIR = __dirname,
HTML_FILE = path.join(DIST_DIR, 'index.html'),
SDK_FILES = path.join(DIST_DIR, '../build/releases/');

var RateLimit = require('express-rate-limit');
var limiter = RateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // max 100 requests per windowMs
max: 1000, // max 1000 requests per windowMs
});
// apply rate limiter to all requests
app.use(limiter);
Expand Down

0 comments on commit f8df45e

Please sign in to comment.