fix nginx security headers not being applied to https responses
Deploy nginx / deploy (push) Successful in 3s
Deploy nginx / test (push) Successful in 54s

nginx add_header inheritance meant X-Content-Type-Options and X-Frame-Options
were silently dropped from all https server blocks. moved all security headers
into a shared snippet (security-headers.inc) included per server block. added
pytest-based header verification that auto-discovers sites from conf files.
This commit is contained in:
2026-03-20 15:11:56 -04:00
parent 3b41653c04
commit cc07a34489
13 changed files with 622 additions and 11 deletions
+11
View File
@@ -16,3 +16,14 @@ jobs:
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-nginx
test:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install pytest
- run: pytest test/ -v