Forked from sielay/gist:0aa4077829f35f5e0310f9e0cc9fdc71
Last active
September 29, 2023 07:17
-
-
Save zveronline/4352ebdf7f9888f16a7edf695fc27ead to your computer and use it in GitHub Desktop.
Revisions
-
zveronline revised this gist
Sep 6, 2023 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ acl from_cf src -f /etc/haproxy/cf-ips http-request set-src req.hdr(CF-Connecting-IP) if from_cf option forwardfor if-none -
zveronline revised this gist
Jun 18, 2021 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ acl from_cf src -f /etc/haproxy/cf-ips acl cf_ip_hdr req.hdr(Cf-Connecting-Ip) -m found http-request set-header X-Forwarded-For %[req.hdr(Cf-Connecting-Ip)] if from_cf cf_ip_hdr option forwardfor if-none -
zveronline revised this gist
Jun 18, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ acl from_cf src -f /etc/haproxy/cf-ips reqidel ^X-Forwarded-For:.* if ! LOCALHOST reqirep ^Cf-Connecting-Ip:(.*)$ X-Forwarded-For:\1 if from_cf option forwardfor if-none -
zveronline revised this gist
Jun 18, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ acl from_cf src -f /etc/haproxy/cf-ips reqidel ^X-Forwarded-For:.* if ! LOCALHOST reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if from_cf option forwardfor if-none -
zveronline revised this gist
May 17, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ acl from_cf src -f /etc/haproxy/cf-ips-v4 reqidel ^X-Forwarded-For:.* if ! LOCALHOST reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if from_cf option forwardfor if-none -
zveronline revised this gist
May 17, 2019 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,4 @@ acl FROM_CLOUDFLARE src -f /etc/haproxy/cf-ips-v4 reqidel ^X-Forwarded-For:.* if ! LOCALHOST reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if FROM_CLOUDFLARE option forwardfor if-none -
zveronline revised this gist
Dec 25, 2017 . 2 changed files with 6 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ acl FROM_CLOUDFLARE src -f /etc/haproxy/cf-ips-v4 acl FROM_CLOUDFLARE2 src -f /etc/haproxy/cf-ips-v4 reqidel ^X-Forwarded-For:.* if ! LOCALHOST reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if FROM_CLOUDFLARE reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if FROM_CLOUDFLARE2 option forwardfor if-none -
zveronline revised this gist
Dec 25, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ frontend www-http capture request header X-Forwarded-For len 50 acl is_cf src -f /etc/haproxy/cf-ips-v4 http-request set-header X-Client-IP %[src] if !is_cf http-request set-header X-Client-IP %[hdr(cf-connecting-ip)] if is_cf -
sielay created this gist
Aug 10, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ frontend www-http bind :80 bind *:443 ssl crt /etc/haproxy/certs no-sslv3 capture request header X-Forwarded-For len 50 acl is_cf req.hdr(cf-connecting-ip) -m found http-request set-header X-Client-IP %[src] if !is_cf http-request set-header X-Client-IP %[hdr(cf-connecting-ip)] if is_cf