DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Express.js Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
Express.js
Why must you configure `app.set('trust proxy', 1)` in Express when applying rate limiters behind a load balancer?
A
To encrypt client request IP addresses
B
To ensure Express reads client IPs from the `X-Forwarded-For` header rather than using the load balancer's IP, preventing all users from being blocked under one rate limit
C
To allow CORS requests on all routes
D
To bypass database connection limits
Check Answer