fix: decouple edge HSTS from backend health #44
@@ -13,5 +13,7 @@ def test_edge_hsts_ownership_is_explicit_and_verified():
|
||||
assert '["security.W004"]' in settings
|
||||
assert "DJANGO_HSTS_AT_EDGE=true" in workflow
|
||||
assert 'DEPLOY_HEALTH_HOST="math.jacky0987.xyz"' in workflow
|
||||
assert "curl --silent --show-error --head" in deploy
|
||||
assert "curl --fail --silent --show-error --head" not in deploy
|
||||
assert "strict-transport-security:.*max-age=[1-9][0-9]*" in deploy
|
||||
assert "DJANGO_HSTS_AT_EDGE=false" in example
|
||||
|
||||
@@ -235,7 +235,7 @@ fi
|
||||
cd "$PROJECT_DIR/backend"
|
||||
if [ "${DJANGO_USE_HTTPS:-true}" = "true" ]; then
|
||||
if [ "${DJANGO_HSTS_AT_EDGE:-false}" = "true" ]; then
|
||||
curl --fail --silent --show-error --head \
|
||||
curl --silent --show-error --head \
|
||||
--noproxy '*' \
|
||||
--resolve "${HEALTH_HOST}:443:127.0.0.1" \
|
||||
--max-time 10 \
|
||||
|
||||
Reference in New Issue
Block a user