Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CloudFrontのIPアドレスを取得してnginxのset_real_ip_fromの形式で出力
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
You can’t perform that action at this time.