update ipAddressHeaders

This commit is contained in:
Amruth Pillai
2026-04-29 19:55:31 +02:00
parent 4b071f2db7
commit 1fbe89bc01
+7 -1
View File
@@ -8,7 +8,13 @@ type ContextWithHeaders = {
user?: { id: string } | null;
};
export const TRUSTED_IP_HEADERS = ["CF-Connecting-IP", "X-Forwarded-For", "X-Real-IP", "True-Client-IP"];
export const TRUSTED_IP_HEADERS = [
"CF-Connecting-IP",
"CF-Connecting-IPv6",
"True-Client-IP",
"X-Forwarded-For",
"X-Real-IP",
];
function getTrustedIp(headers?: Headers): string | null {
if (!headers) return null;