Skip to content

Commit

Permalink
Correct env variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadhonrao committed Oct 25, 2024
1 parent 0adf65a commit 2f96570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ app.use(mongoSanitize()); // Sanitize data
app.use(helmet()); // Set security headers
app.use(xss()); // Prevent cross site scripting attacks

const rateLimitMax = process.env.RATE_LIMIT_MAX || 100;
const rateLimitWindowMs = process.env.RATE_LIMIT_WINDOW_MS || 15 * 60 * 1000; // Default to 15 minutes
const rateLimitMax = process.env.rate_limit_max || 100;
const rateLimitWindowMs = process.env.rate_limit_window || 15 * 60 * 1000; // Default to 15 minutes

const limiter = rateLimit({
windowMs: rateLimitWindowMs, // Use environment variable or default to 15 minutes
Expand Down

0 comments on commit 2f96570

Please sign in to comment.