首页 > 其他 > 详细

CEF 跨域访问iframe

时间:2019-01-18 18:16:30      阅读:407      评论:0      收藏:0      [点我收藏+]

转载:https://www.cnblogs.com/wxxweb/p/3738696.html

 

在CefBrowserSettings也就是_cef_browser_settings_t结构体中,有个成员变量web_security,来看下它的注释

///
  // Controls whether web security restrictions (same-origin policy) will be
  // enforced. Disabling this setting is not recommend as it will allow risky
  // security behavior such as cross-site scripting (XSS). Also configurable
  // using the "disable-web-security" command-line switch.
  ///
  cef_state_t web_security;

1.将其赋值为true,即可运行跨域访问

2.命令行设置

command_line->AppendSwitch("--disable-web-security");//关闭同源策略

 

CEF 跨域访问iframe

原文:https://www.cnblogs.com/chechen/p/10289000.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!