mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-27 10:24:48 +10:00
update ipAddressHeaders
This commit is contained in:
@@ -8,7 +8,13 @@ type ContextWithHeaders = {
|
|||||||
user?: { id: string } | null;
|
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 {
|
function getTrustedIp(headers?: Headers): string | null {
|
||||||
if (!headers) return null;
|
if (!headers) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user