我使用 "create-react-app" 创建了一个示例 react 应用程序。 我需要使用X-Frame-options
和Content-Security-Policy
设置请求标头。我该如何做?我尝试使用下面的代码更新我的index.html
,但我不确定它是否正确。有人可以帮忙吗?
<meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
<meta http-equiv="X-Frame-Options" content="SAMEORIGIN">