API 安全核对清单

身份验证与授权

输入验证

数据保护

错误处理和日志记录

速率限制与安全防护

API 设计最佳实践

安全头设置

    • Content-Security-Policy:防止跨站脚本和数据注入攻击。
    • X-Content-Type-Options: nosniff:阻止浏览器 MIME 类型猜测。
    • X-Frame-Options: DENY:防止点击劫持攻击。
    • Strict-Transport-Security:强制使用 HTTPS 访问。

跨域资源共享(CORS)

第三方组件和依赖

测试与审计

法规遵从与隐私

其他安全考虑


https://withesse.co/post/api-security-checklist/
Author
zt
Posted on
May 27, 2025
Licensed under