Skip to content
Open
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
4 changes: 3 additions & 1 deletion packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default function makeApp() {
}))

// Set to trust proxy so we can resolve client IP address
app.enable('trust proxy')
// We trust internal network IPs (like the internal Azure infrastructure) as proxies.
// This tracks the real client IP regardless of the number of internal routing hops, while stripping spoofed headers.
app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal'])

app.use(iRequestMiddleware);
app.use(loggerMiddleware);
Expand Down