fix: use certificate host for deployment health checks
CI / test (pull_request) Successful in 6m43s
PR合并自动部署 / release-check (pull_request) Successful in 3s
PR合并自动部署 / deploy (pull_request) Failing after 11s

This commit is contained in:
2026-09-29 00:51:01 +08:00
parent f7536d3a3f
commit c89b82c6f4
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -104,6 +104,7 @@ jobs:
PROJECT_DIR="$PROJECT" \ PROJECT_DIR="$PROJECT" \
PYTHON_BIN="$PYTHON_BIN" \ PYTHON_BIN="$PYTHON_BIN" \
PREVIOUS_REVISION="$PREVIOUS_REVISION" \ PREVIOUS_REVISION="$PREVIOUS_REVISION" \
DEPLOY_HEALTH_HOST="math.jacky0987.xyz" \
DEPLOY_SMOKE_BASE_URL="http://127.0.0.1:4321" \ DEPLOY_SMOKE_BASE_URL="http://127.0.0.1:4321" \
DEPLOY_SMOKE_WS_URL="ws://127.0.0.1:4321/ws/health/" \ DEPLOY_SMOKE_WS_URL="ws://127.0.0.1:4321/ws/health/" \
bash scripts/deploy_production.sh bash scripts/deploy_production.sh
@@ -12,5 +12,6 @@ def test_edge_hsts_ownership_is_explicit_and_verified():
assert 'os.getenv("DJANGO_HSTS_AT_EDGE", "false")' in settings assert 'os.getenv("DJANGO_HSTS_AT_EDGE", "false")' in settings
assert '["security.W004"]' in settings assert '["security.W004"]' in settings
assert "DJANGO_HSTS_AT_EDGE=true" in workflow assert "DJANGO_HSTS_AT_EDGE=true" in workflow
assert 'DEPLOY_HEALTH_HOST="math.jacky0987.xyz"' in workflow
assert "strict-transport-security:.*max-age=[1-9][0-9]*" in deploy assert "strict-transport-security:.*max-age=[1-9][0-9]*" in deploy
assert "DJANGO_HSTS_AT_EDGE=false" in example assert "DJANGO_HSTS_AT_EDGE=false" in example