mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-19 01:46:10 -04:00
Merge pull request #337 from linuxserver/cf-realip-api
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
|
|
||||||
printf "set_real_ip_from %b;\n" $(curl -Ls "https://www.cloudflare.com/ips-v4") > /config/nginx/cf_real-ip.conf
|
printf "set_real_ip_from %b;\n" $(curl -s "https://api.cloudflare.com/client/v4/ips" | jq -r '.result.ipv4_cidrs[]') > /config/nginx/cf_real-ip.conf
|
||||||
printf "set_real_ip_from %b;\n" $(curl -Ls "https://www.cloudflare.com/ips-v6") >> /config/nginx/cf_real-ip.conf
|
printf "set_real_ip_from %b;\n" $(curl -s "https://api.cloudflare.com/client/v4/ips" | jq -r '.result.ipv6_cidrs[]') >> /config/nginx/cf_real-ip.conf
|
||||||
printf "set_real_ip_from %b;\n" $(ip route | grep -v default | awk '{print $1}') >> /config/nginx/cf_real-ip.conf
|
printf "set_real_ip_from %b;\n" $(ip route | grep -v default | awk '{print $1}') >> /config/nginx/cf_real-ip.conf
|
||||||
|
|
||||||
chown abc:abc /config/nginx/cf_real-ip.conf
|
chown abc:abc /config/nginx/cf_real-ip.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user