Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Bump Cloudflare IP priority

Tuan Dangd62e1c3703ef
diff --git a/backend/src/server/plugins/ip.ts b/backend/src/server/plugins/ip.ts
index d43bf8d70a..b3c8171af3 100644
--- a/backend/src/server/plugins/ip.ts
+++ b/backend/src/server/plugins/ip.ts
@@ -3,10 +3,10 @@ import fp from "fastify-plugin";
/*! https://github.com/pbojinov/request-ip/blob/9501cdf6e73059cc70fc6890adb086348d7cca46/src/index.js.
MIT License. 2022 Petar Bojinov - [email protected] */
const headersOrder = [
- "x-client-ip", // Most common
- "x-forwarded-for", // Mostly used by proxies
"cf-connecting-ip", // Cloudflare
"Cf-Pseudo-IPv4", // Cloudflare
+ "x-client-ip", // Most common
+ "x-forwarded-for", // Mostly used by proxies
"fastly-client-ip",
"true-client-ip", // Akamai and Cloudflare
"x-real-ip", // Nginx