Bump Cloudflare IP priority

This commit is contained in:
Tuan Dang
2024-01-29 16:51:38 +07:00
parent 9bba9ee9b1
commit d62e1c3703
+2 -2
View File
@@ -3,10 +3,10 @@ import fp from "fastify-plugin";
/*! https://github.com/pbojinov/request-ip/blob/9501cdf6e73059cc70fc6890adb086348d7cca46/src/index.js. /*! https://github.com/pbojinov/request-ip/blob/9501cdf6e73059cc70fc6890adb086348d7cca46/src/index.js.
MIT License. 2022 Petar Bojinov - [email protected] */ MIT License. 2022 Petar Bojinov - [email protected] */
const headersOrder = [ const headersOrder = [
"x-client-ip", // Most common
"x-forwarded-for", // Mostly used by proxies
"cf-connecting-ip", // Cloudflare "cf-connecting-ip", // Cloudflare
"Cf-Pseudo-IPv4", // Cloudflare "Cf-Pseudo-IPv4", // Cloudflare
"x-client-ip", // Most common
"x-forwarded-for", // Mostly used by proxies
"fastly-client-ip", "fastly-client-ip",
"true-client-ip", // Akamai and Cloudflare "true-client-ip", // Akamai and Cloudflare
"x-real-ip", // Nginx "x-real-ip", // Nginx