Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ function requireAuth(req, res, next) {
// ─────────────────────────────────────────────────────────────────────────────
const app = express();

// Render (and most PaaS hosts) terminate TLS at a single reverse proxy that
// forwards the client IP in X-Forwarded-For. Trust exactly one proxy hop so
// express-rate-limit can identify clients by real IP without trusting a
// spoofable header chain. See ERR_ERL_UNEXPECTED_X_FORWARDED_FOR.
app.set('trust proxy', 1);

const LOCAL_DEV_ORIGINS = [
'http://localhost:5173',
'http://127.0.0.1:5173',
Expand Down
Loading