There was an error while loading. Please reload this page.
1 parent 5ab078d commit f12cf88Copy full SHA for f12cf88
1 file changed
skills/nginx-spa/scripts/verify-spa.sh
@@ -85,8 +85,16 @@ request() {
85
method=$2
86
path=$3
87
header_file="$tmp_dir/$name.headers"
88
- curl -sS --connect-timeout 5 --max-time 15 -X "$method" -o /dev/null -D "$header_file" \
89
- -w '%{http_code}' "$base_url$path"
+ case "$method" in
+ HEAD)
90
+ curl -sS --connect-timeout 5 --max-time 15 --head -o /dev/null -D "$header_file" \
91
+ -w '%{http_code}' "$base_url$path"
92
+ ;;
93
+ *)
94
+ curl -sS --connect-timeout 5 --max-time 15 -X "$method" -o /dev/null -D "$header_file" \
95
96
97
+ esac
98
}
99
100
header_value() {
0 commit comments