X-Frame-Options & iframe & CORS

https://github.com/xgqfrms/FEIQA/issues/23


X-Frame-Options

iframe & CORS

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

bug

Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.

sandbox

iframe & mdn

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe



const showDOM = (url = ``) => {
let iframeBox = $qs(`[data-img-box="empty-iframe-page-box"]`);
let no_data = `
<p data-no-data="p">
<span data-no-data="span">暂无数据</span>
</p>
`;
try {
if (url) {
let iframe = document.createElement(`iframe`);
iframe.src = url;
// sandbox
// srcdoc
iframe.style.height = `100%`;
iframe.style.width = `100%`;
iframe.style.minHeight = `300px`;
iframe.style.minWidth = `500px`;
iframe.setAttribute(`sandbox`, `allow-scripts`);
iframe.setAttribute(`sandbox`, `allow-scripts`);
iframe.setAttribute(`data-iframe`, `empty-iframe-page`);
iframe.setAttribute(`name`, `页面空模块`);
if (iframeBox) {
iframeBox.innerHTML = "";
iframeBox.insertAdjacentElement(`beforeend`, iframe);
}
}
} catch (err) {
// no data
iframeBox.innerHTML = "";
iframeBox.insertAdjacentHTML(`beforeend`, no_data);
throw new Error(`fetch image error`, err);
}
};

https://community.tableau.com/thread/157316

https://www.digitalocean.com/community/questions/blocking-iframe-because-it-set-x-frame-options-to-deny

https://stackoverflow.com/questions/20498831/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin

https://github.com/jeduan/cordova-plugin-facebook4/issues/323


https://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options#answer-7469997

https://developer.salesforce.com/forums/?id=906F00000009BRJIA2

https://blogs.msdn.microsoft.com/ie/2009/01/27/ie8-security-part-vii-clickjacking-defenses/

https://security.stackexchange.com/questions/67889/why-do-browsers-enforce-the-same-origin-security-policy-on-iframes

https://security.stackexchange.com/questions/167081/how-to-add-x-frame-options-header-to-a-simple-html-file

好像是服务器为了防止点击劫持,而设置的.


X-Frame-Options

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options#Configuring_Apache


OK

https://cn.bing.com/?intlF=&ensearch=1

https://cdn.xgqfrms.xyz/

x-frame-options: DENY

https://developer.mozilla.org/en-US/docs/Web/CSS/calc


iframe & HTTPS & CORS

https://iframe.xgqfrms.xyz/eapp/index.html#blog.sina.cn



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


X-Frame-Options & iframe & CORS的更多相关文章

  1. iframe & cors

    iframe & cors <!DOCTYPE html> <html lang="zh-Hans"> <head> <meta ...

  2. selenium之 定位以及切换frame(iframe)

    Set<String> windows = driver.getWindowHandles();        int count = 0;        for(String handl ...

  3. 操作Frame和IFrame中页面元素

    HTML <iframe> 标签 定义:iframe 元素会创建包含另外一个文档的内联框架(即行内框架). frame标签有frameset.frame.iframe三种,frameset ...

  4. frame与iframe的区别及基本用法

    frame 和 iframe 的区别 1.frame 不能脱离 frameset 单独使用,iframe 可以: 2.frame 不能放到body中,否则将无法显示: 3.iframe 也可以嵌套在f ...

  5. 【Selenium2】【selenium之 定位以及切换frame(iframe)】

    参考:http://blog.csdn.net/huilan_same/article/details/52200586 总有人看不明白,以防万一,先在开头大写加粗说明一下: frameset不用切, ...

  6. 【转载】selenium之 定位以及切换frame(iframe)

    更多关于python selenium的文章,请关注我的专栏:Python Selenium自动化测试详解 总有人看不明白,以防万一,先在开头大写加粗说明一下: frameset不用切,frame需层 ...

  7. selenium-java,定位并操作frame和iframe内的元素

    因为frame和iframe的原因,在frame里的元素不能直接定位需要切到相应的frame才可以对元素进行操作,下面是涉及的方法 webDriver.switchTo().defaultConten ...

  8. html Frame、Iframe、Frameset 的区别 详细出处参考:http://www.jb51.net/web/22785.html

    10.4.1 Frameset与Frame的区别首先讲解Frameset与Frame之间的区别. 用来划分框架,每一个框架由标记.必须在之内使用,代码如下: 在上面的例子当中,把页面分为左右两个部分, ...

  9. selenium切换frame(iframe)

    例如网页代码为: <!DOCTYPE html><html lang="en"><head> <meta charset="UT ...

随机推荐

  1. Qt QMenuBar和QMenu以及QAction巧妙的使用方法

    这里简单介绍QMenuBar和QMenu以及QAction是什么,其详细功能本文不做介绍,如果还不了解的朋友可以查阅Qt的帮助手册或浏览其它相关博客.如下图,软件中蓝色条框是QMenuBar用来承载Q ...

  2. # from tall import b from tall import * print(b) __all__ 模块 引用管理

    ├── __init__.py├── tall2.py└── tall.pytall.pya = 23b = 34class I: def __init__(self): print(444)clas ...

  3. Any race is a bug. When there is a race, the compiler is free to do whatever it wants.

    https://mp.weixin.qq.com/s/pVJiFdDDKVx707eKL19bjA 谈谈 Golang 中的 Data Race 原创 ms2008 poslua 2019-05-13 ...

  4. Nagle's algorithm 封包 网络游戏协议封包需注意点 封包挂

    w41字节的数据包只有1字节的可用信息.以减少数据包发送量来提高TCP/IP网络性能. https://en.wikipedia.org/wiki/Nagle's_algorithm https:// ...

  5. linux系统find命令详解+xargs命令 、exec命令

    find 作用:查找文件 1.name: 指定文件名 例子1. 找到以du结尾的文件 ╭─root@localhost.localdomain ~ ╰─➤ find / -name "*du ...

  6. 四. SpringCloud负载均衡与调用

    1. Ribbon概述 1.1 Ribbon是什么 SpringCloud Ribbon是基于Netflix Ribbon实现的一套客户端,是负载均衡的工具. Ribbon是Netflix发布的开源项 ...

  7. D - D (最短路解决源点到多点,多点到源点的和(有向图))

    问从1号点到各个点的距离+各个点到1号点之间的距离和的最小值 In the age of television, not many people attend theater performances ...

  8. Codeforces Round #651 (Div. 2) E. Binary Subsequence Rotation(dp)

    题目链接:https://codeforces.com/contest/1370/problem/E 题意 给出两个长为 $n$ 的 $01$ 串 $s$ 和 $t$,每次可以选择 $s$ 的一些下标 ...

  9. Codeforces Round #345 (Div. 1) A. Watchmen (数学,map)

    题意:给你\(n\)个点,求这\(n\)个点中,曼哈顿距离和欧几里得距离相等的点对数. 题解: 不难发现,当两个点的曼哈顿距离等于欧几里得距离的时候它们的横坐标或者纵坐标至少有一个相同,可以在纸上画一 ...

  10. 避坑!js正确地使用fill()初始化二维数组

    先介绍一下坑 fill()方法都知道,填充数组 比如: let a = new Array(5).fill(0); console.log(a); // 输出结果为[0, 0, 0, 0, 0] 当我 ...