Skip to content

Commit

Permalink
fix: FORMS-954 express handle proxied ip addresses (bcgov#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterMoar authored Jan 16, 2024
1 parent e1ff11e commit 97687e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ app.use(express.urlencoded({ extended: true }));
// pulls the IP address from the headers, rather than use the proxy IP address.
// This gives the correct IP address in the logs and for the rate limiting.
// See https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR
// app.set('trust proxy', 1);
app.set('trust proxy', 1);

// Skip if running tests
if (process.env.NODE_ENV !== 'test') {
Expand Down

0 comments on commit 97687e4

Please sign in to comment.