same-origin-policy

Disable firefox same origin policy

倖福魔咒の 提交于 2019-11-26 03:48:42
问题 I\'m developing a local research tool that requires me to turn off Firefox\'s same origin policy (in terms of script access, I don\'t really care about cross domain requests). More specifically, I want scripts in the host domain to be able to access arbitrary elements in any iframes embedded in the page, regardless of their domain. I\'m aware previous Q&As which mentioned the CORS FF extension, but that is not what I need, since it only allows CORS, but not script access. If it cannot be done

Google Chrome --allow-file-access-from-files disabled for Chrome Beta 8

拟墨画扇 提交于 2019-11-26 03:39:40
问题 I have been developing an AJAX application using jQuery and Microsoft Seadragon technology. I need to have access to the html5 canvas function toDataURL. With Google Chrome, the same origin rule applies to this function which means that a page run locally (with the file:/// in the URL) failed to satisfy the same origin rule and an exception is thrown. With Chrome 7, starting the application with --allow-file-access-from-files option, allows to call canvas.toDataURL() from local files. However

Cross Domain Form POSTing

ぐ巨炮叔叔 提交于 2019-11-26 02:28:08
问题 I\'ve seen articles and posts all over (including SO) on this topic, and the prevailing commentary is that same-origin policy prevents a form POST across domains. The only place I\'ve seen someone suggest that same-origin policy does not apply to form posts, is here. I\'d like to have an answer from a more \"official\" or formal source. For example, does anyone know the RFC that addresses how same-origin does or does not affect a form POST? clarification : I am not asking if a GET or POST can

Catch error if iframe src fails to load . Error :-“Refused to display 'http://www.google.co.in/' in a frame..”

三世轮回 提交于 2019-11-26 01:47:38
问题 I am using Knockout.js to bind iframe src tag(This will be configurable with respect to User). Now, if user has configured http://www.google.com (I know it won\'t load in iframe, thats why I am using it for -ve scenario) and that has to be shown in IFrame. but it throws error:- Refused to display \'http://www.google.co.in/\' in a frame because it set \'X-Frame-Options\' to \'SAMEORIGIN\'. I have the following code for Iframe:- <iframe class=\"iframe\" id=\"iframe\" data-bind=\"attr: {src:

Ways to circumvent the same-origin policy

╄→гoц情女王★ 提交于 2019-11-25 22:50:39
问题 The same origin policy I wanted to make a community wiki regarding HTML/JS same-origin policies to hopefully help anyone searching for this topic. This is one of the most searched-for topics on SO and there is no consolidated wiki for it so here I go :) The same origin policy prevents a document or script loaded from one origin from getting or setting properties of a document from another origin. This policy dates all the way back to Netscape Navigator 2.0. What are some of your favorite ways

Catch error if iframe src fails to load . Error :-“Refused to display &#39;http://www.google.co.in/&#39; in a frame..”

让人想犯罪 __ 提交于 2019-11-25 22:45:18
I am using Knockout.js to bind iframe src tag(This will be configurable with respect to User). Now, if user has configured http://www.google.com (i know it won't load in iframe, thats why i am using it for -ve scenario) and that has to be shown in IFrame. but it throws error:- Refused to display ' http://www.google.co.in/ ' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. I have the following code for Iframe:- <iframe class="iframe" id="iframe" data-bind="attr: {src: externalAppUrl, height: iframeheight}"> <p>Hi, This website does not supports IFrame</p> </iframe> What i want is,

SecurityError: Blocked a frame with origin from accessing a cross-origin frame

廉价感情. 提交于 2019-11-25 22:14:33
问题 I am loading an <iframe> in my HTML page and trying to access the elements within it using Javascript, but when I try to execute my code, I get the following error: SecurityError: Blocked a frame with origin \"http://www.<domain>.com\" from accessing a cross-origin frame. Can you please help me to find a solution so that I can access the elements in the frame? I am using this code for testing, but in vain: $(document).ready(function() { var iframeWindow = document.getElementById(\"my-iframe

jQuery/JavaScript: accessing contents of an iframe

你。 提交于 2019-11-25 22:12:31
问题 I would like to manipulate the HTML inside an iframe using jQuery. I thought I\'d be able to do this by setting the context of the jQuery function to be the document of the iframe, something like: $(function(){ //document ready $(\'some selector\', frames[\'nameOfMyIframe\'].document).doStuff() }); However this doesn\'t seem to work. A bit of inspection shows me that the variables in frames[\'nameOfMyIframe\'] are undefined unless I wait a while for the iframe to load. However, when the

Why does my JavaScript code get a “No &#39;Access-Control-Allow-Origin&#39; header is present on the requested resource” error when Postman does not?

筅森魡賤 提交于 2019-11-25 22:09:27
问题 I am trying to do authorization using JavaScript by connecting to the RESTful API built in Flask. However, when I make the request, I get the following error: XMLHttpRequest cannot load http://myApiUrl/login. No \'Access-Control-Allow-Origin\' header is present on the requested resource. Origin \'null\' is therefore not allowed access. I know that the API or remote resource must set the header, but why did it work when I made the request via the Chrome extension Postman? This is the request

XMLHttpRequest cannot load XXX No &#39;Access-Control-Allow-Origin&#39; header

笑着哭i 提交于 2019-11-25 21:32:00
问题 tl;dr; About the Same Origin Policy I have a Grunt process which initiates an instance of express.js server. This was working absolutely fine up until just now when it started serving a blank page with the following appearing in the error log in the developer\'s console in Chrome (latest version): XMLHttpRequest cannot load https://www.example.com/ No \'Access-Control-Allow-Origin\' header is present on the requested resource. Origin \'http://localhost:4300\' is therefore not allowed access.