X-Frame-Options 为 deny 报错

 

前面还好好的,今天线上就反馈出这个问题。百度一下,就是iframe框不能返回数据,下面解决方法

 

解决方法一
//代码中添加响应头
app.Use(async (context, next) => { // Do work that can write to the Response. context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); await next.Invoke(); // Do logging or other work that doesn't write to the Response. });
解决方法二
在IIS 中添加响应头就行,然后应用池重启下,网页端清楚缓存解决

  

 

 

 

成功解决

 

 

20230602   再次记录

 

 

使用上面方法 未生效 ,弄了半天  把微信端 地址到流程器端 跑起来查看就明了 ,上图也能一眼就看出问题,但是没细心啊  

 

posted @ 2023-03-29 17:03  孤海飞雁  阅读(456)  评论(0)    收藏  举报