Content Security Policy
CSP (Content Security Policy) | prevents XSS and | code injection attacks | by specifying trusted content sources.
CSP (Content Security Policy) | ngăn chặn các cuộc tấn công XSS | và tiêm mã | bằng cách chỉ định các nguồn nội dung đáng tin cậy.
Implemented via HTTP headers | or meta tags, | defining rules for scripts, | stylesheets, images, and fonts.
Được triển khai qua HTTP headers | hoặc thẻ meta, | xác định các quy tắc cho tập lệnh, | bảng kiểu, hình ảnh và phông chữ.
Reduces malicious code execution risk | but requires | careful configuration.
Giảm rủi ro thực thi mã độc | nhưng đòi hỏi | cấu hình cẩn thận.
Resources
- MDN — Content Security Policy (CSP) (article)
- Google Devs — Content Security Policy (CSP) (article)
- Content Security Policy Explained (video)
References
- https://roadmap.sh/backend (Node: CSP)