Missing Content-Security-Policy HTTP header

이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Description

This publicly exposed API endpoint was found responding with HTML or browser-rendered content and does not implement the Content Security Policy (CSP) header. Since the response content of this API can be rendered by a browser, this header specifies which domains the browser should consider as valid sources and prevent unwanted executable scripts, and other resources.

Remediation

Implement the Content Security Policy (CSP) header in all API responses that return browser-rendered content.

Examples when this header is useful:

# Swagger UI docs
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; img-src 'self' data:; connect-src 'self' https://api.example.com