mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 04:19:53 +03:00
This change enhances the platform's security posture by implementing missing HTTP response headers as mandated by the project's security roadmap:
- Created a custom `SecurityHeadersMiddleware` to enforce `Referrer-Policy: strict-origin-when-cross-origin` and `Permissions-Policy: camera=(), microphone=()`.
- Updated `MIDDLEWARE` in `aniscrap_core/settings.py` to include the new custom middleware.
- Hardened the `django-csp` Content-Security-Policy settings to require nonces for inline scripts (`CSP_INCLUDE_NONCE_IN = ('script-src',)` and removed `'unsafe-inline'` from `CSP_SCRIPT_SRC`).
- Verified existing `SECURE_HSTS_SECONDS` configurations for production deployment.
- Added unit tests for the new custom middleware (`aniscrap_core/tests.py`).
- Updated project documentation (`development-plan.md` and `sentinel.md`) with task completion and new vulnerability prevention learnings.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.