mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-01 04:21:56 -04:00
399e79f2fa
Print new line instead of a `%` at the end of the last line
12 lines
358 B
Plaintext
12 lines
358 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
# shellcheck shell=bash
|
|
# shellcheck disable=SC2046
|
|
|
|
printf "set_real_ip_from %b;\n" $({
|
|
curl -s -w '\n' "https://www.cloudflare.com/ips-v4" &
|
|
curl -s -w '\n' "https://www.cloudflare.com/ips-v6" &
|
|
ip route | grep -v default | awk '{print $1}'
|
|
}) > /config/nginx/cf_real-ip.conf
|
|
|
|
chown abc:abc /config/nginx/cf_real-ip.conf
|