BIN: analyse-headers: read from stdin if first arg is -
This makes testing much easier
This commit is contained in:
parent
039f4e2270
commit
27b9af6327
1 changed files with 7 additions and 1 deletions
|
@ -403,7 +403,13 @@ args+=("$@")
|
|||
url="${args[0]}"
|
||||
[ -z "$url" ] && die "You need to specify a url"
|
||||
|
||||
headers="$(curl -s -I "$url")"
|
||||
# If url is -, read headers from stdin
|
||||
if [ "$url" = "-" ]; then
|
||||
headers="$(cat -)"
|
||||
else
|
||||
headers="$(curl -s -I "$url")"
|
||||
fi
|
||||
|
||||
missingHeaders="x-frame-options
|
||||
content-security-policy
|
||||
x-xss-protection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue