Reordered IP headers.
Some checks failed
Create docker images (cloud) / Build, push, and deploy (push) Has been cancelled
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled

This commit is contained in:
Mike Cao 2025-11-18 10:25:08 -08:00
parent ef3f7274e3
commit abc1b50ad0

View file

@ -1,16 +1,16 @@
export const IP_ADDRESS_HEADERS = [
'true-client-ip', // CDN
'x-real-ip', // Reverse proxy
'x-forwarded-for',
'cf-connecting-ip', // Cloudflare
'fastly-client-ip', // Fastly
'x-nf-client-connection-ip', // Netlify
'do-connecting-ip', // Digital Ocean
'x-real-ip', // Reverse proxy
'x-appengine-user-ip', // Google App Engine
'x-forwarded-for',
'forwarded',
'x-client-ip',
'x-cluster-client-ip',
'x-forwarded',
'forwarded',
];
export function getIpAddress(headers: Headers) {