Created
August 1, 2019 12:56
-
-
Save thoughtpolice/8175c9ff36987ec75b15c3f8c4d78036 to your computer and use it in GitHub Desktop.
Grab Fastly debugging info from cache.nixos.org
This file contains 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
#!/usr/bin/env bash | |
[ -z "$1" ] && echo "ERROR: must provide arg" && exit 1 | |
CACHE_URL=${CACHE_URL:-"https://cache.nixos.org"} | |
curl -v \ | |
-HFastly-Debug:1 \ | |
-o /dev/null 2>&1 \ | |
"$CACHE_URL/$1" \ | |
| grep -E '(fastly-debug|served-by|cache)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
More information on
Fastly-Debug: 1
is available here: https://support.fastly.com/hc/en-us/community/posts/360040167211-Deciphering-Fastly-Debug-header