()
| 85 | const first = input.forwardedFor.split(",")[0]?.trim(); |
| 86 | |
| 87 | if (first !== undefined && first !== "") { |
| 88 | return first; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | return input.socketAddress ?? ""; |
| 93 | }; |
| 94 | |
| 95 | const buildKeyGenerator = (): Generator | undefined => { |
| 96 | if (!env.TRUST_PROXY) { |
| 97 | return undefined; |
| 98 | } |
| 99 | |
| 100 | return (request, server) => |
no test coverage detected