Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e1e0c26e1 |
@@ -82,17 +82,11 @@ main() {
|
||||
# its location drops the server's own unless the location includes
|
||||
# the security headers again; only Content-Security-Policy is
|
||||
# checked, as it comes from the same file as the rest. curl tries up
|
||||
# to ten more times, a second apart, while nginx starts. It runs
|
||||
# without -S, which would print an error for every failed attempt,
|
||||
# even when a later one succeeds.
|
||||
# to ten more times, a second apart, while nginx starts.
|
||||
for path in / /no-such-page; do
|
||||
if ! headers="$(docker exec "$SERVER" curl -s -o /dev/null -D - \
|
||||
headers="$(docker exec "$SERVER" curl -sS -o /dev/null -D - \
|
||||
--retry 10 --retry-connrefused --retry-delay 1 \
|
||||
"http://127.0.0.1:8080$path")"; then
|
||||
echo "frontend-viewport-test: nginx did not answer $path" >&2
|
||||
exit 1
|
||||
fi
|
||||
headers="$(printf '%s\n' "$headers" | tr -d '\r')"
|
||||
"http://127.0.0.1:8080$path" | tr -d '\r')"
|
||||
if ! printf '%s\n' "$headers" | grep -qix 'Cache-Control: no-cache' ||
|
||||
! printf '%s\n' "$headers" | grep -qi '^Content-Security-Policy:'; then
|
||||
echo "frontend-viewport-test: $path needs" \
|
||||
|
||||
Reference in New Issue
Block a user