且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

允许其他人 iframe 我的网站

更新时间:2023-12-04 09:47:46

在您的 golbal.asax.cs 中将 X-Frame-Options 设置为 AllowAll代码>:

In your golbal.asax.cs set X-Frame-Options to AllowAll:

 protected void Application_PreSendRequestHeaders()
 {
    Response.Headers.Remove("X-Frame-Options");
    Response.AddHeader("X-Frame-Options", "AllowAll");
 }