-
-
Save holly/821a5fd2d409a2cd01a0a8f7ec255b5b to your computer and use it in GitHub Desktop.
CloudFrontのIPアドレスを取得してnginxのset_real_ip_fromの形式で出力
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 characters
curl -s "https://ip-ranges.amazonaws.com/ip-ranges.json" |jq -r '.prefixes | map(select(.service == "CLOUDFRONT").ip_prefix) | "set_real_ip_from" + " " + .[] + ";"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment