Skip to content

Commit

Permalink
dev env - fix low rate limit on sandbox
Browse files Browse the repository at this point in the history
The orignal 100 limit can be hit due to the number of resources being
pulled down on each refresh durning testing.
  • Loading branch information
jkasten2 committed Nov 14, 2023
1 parent c50a923 commit e431f12
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 e431f12

Please sign in to comment.