cross-domain

Securing a Browser Helper Object

扶醉桌前 提交于 2019-12-21 09:25:18
问题 I'm currently in the process of building a browser helper object. One of the things the BHO has to do is to make cross-site requests that bypass the cross-domain policy. For this, I'm exposing a __MyBHONameSpace.Request method that uses WebClient internally. However, it has occurred to me that anyone that is using my BHO now has a CSRF vulnerability everywhere as a smart attacker can now make arbitrary requests from my clients' computers. Is there any clever way to mitigate this? 回答1: The

FireBug and monitoring JSONP cross-domain requests

夙愿已清 提交于 2019-12-21 09:07:17
问题 This question is specific to the Firebug plugin for Firefox. The actual functionality works, but I lost my ability to monitor and debug it in Firebug. I had a website which used JSON to get data. In Firebug, I was able to monitor the JSON requests. It would show me each one of them, the headers, and the data that was returned. I needed to change the server to which I submitted my JSON requests. In order to get cross-domain JSON to work, I used JSONP with the callback=? method. I got the

How to use iframe to (cross-domain) post request ?

血红的双手。 提交于 2019-12-21 05:11:11
问题 I want to do a post cross-domain request , I use a form which targeted a iframe to submit the request. var iframe = document.createElement("iframe"); var uniqueString = "CHANGE_THIS_TO_SOME_UNIQUE_STRING"; document.body.appendChild(iframe); iframe.style.display = "none"; iframe.contentWindow.name = uniqueString; var form = document.createElement("form"); form.target = uniqueString; form.action = myUrl; form.method = "POST"; // repeat for each parameter var input = document.createElement(

Cross-Domain AJAX to Read XML

淺唱寂寞╮ 提交于 2019-12-21 04:53:11
问题 Noobie here. I'm writing a client script that needs to read an XML file from another domain. I tried using JSONP. I get a 200 response but the client can't access the returned data for some reason. I get two errors: Resource interpreted as Script but transferred with MIME type text/xml and Uncaught SyntaxError: Unexpected token < Here's the code (I've removed the XML url since it's confidential): $(document).ready(function() { $.getJSON("urlOfFilecallback=?", function(data) { console.log(data

browsers send Options instead of Post after changing http header

夙愿已清 提交于 2019-12-21 02:56:07
问题 /*set the response header*/ Form responseHeaders = (Form) getResponse().getAttributes().get("org.restlet.http.headers"); if (responseHeaders == null) { responseHeaders = new Form(); responseHeaders.add("Access-Control-Allow-Origin", "*"); responseHeaders.add("Access-Control-Allow-Methods", "POST, GET, PUT, DELETE"); getResponse().getAttributes().put("org.restlet.http.headers", responseHeaders); } I added this in my restlet 2.0 code to allow for cross domain access, this does make the first

Enabling CORS (Cross Origin Request) in Django

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 02:27:42
问题 I'm trying to make use of the overpass API http://wiki.openstreetmap.org/wiki/Overpass_API with a JavaScript XMLHttpRequest in a project running on Django but I keep getting the Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.google.com/accounts/ClientLogin. (Reason: CORS header 'Access-Control-Allow-Origin' missing). error. I get this error whether I'm using GET or POST, and from any other host, not just the overpass API. I've

cross-domain AJAX post call

跟風遠走 提交于 2019-12-20 14:36:19
问题 I've to make a POST call(with parameter) to an asp form which is located on another server. For development, I did this on the same server, and it works perfectly, but now I'm testing it on another server, and instead of receiving a 200 status, I receive a 0 status. I think it's because it's a cross-domain AJAX call, it's the only thing which changed. So how can I make this call? Is there any file I can put on the server/client to allow this call(like flash, ...)? Thank you! 回答1: Yes,

Best way to handle Cross Domain on SharePoint Intranet w/o server side, silverlight, DBC etc

非 Y 不嫁゛ 提交于 2019-12-20 10:46:55
问题 I'm working on a Microsoft internal SharePoint site, and I need to pull in List data from a cross domain SharePoint site. I don't want to use Silverlight, for various reasons, and Business Data Connectivity is not possible right now. Is there a simple way to use JavaScript or something like it to accomplish this? 回答1: " Simple ?" Not exactly. Given your requirements, particularly " w/o server side ," this isn't possible. However, if you can forego that requirement, you have a few options for

Cross-domain font-face issues

三世轮回 提交于 2019-12-20 10:32:22
问题 please read all of this before commenting. I'm currently working on a large website which is hosted on Amazon Web Services (AWS). This allows us to use scalability features in situations where the website might take a big traffic load. Originally we started by separating out the code of the website a mix of HTML/PHP/Java etc and have static assets on a separate server. When I first tried using font-face in this setup I found that Firefox and IE would not load the font, and quickly discovered

How to correctly configure a reverse proxy with Apache, to be used for cross-domain AJAX?

◇◆丶佛笑我妖孽 提交于 2019-12-20 10:26:24
问题 Needing to develop a web application that at the same time is highly dependent on an API but at the same time cannot reside on the same domain as the API itself, it's been quite tricky getting around the "Same Origin Policy" when making asynchronous HTTP requests (AJAX). At one point, I was recommended to install WAMP on my computer (running Windows 7) and to configure a reverse proxy with Apache. The same person gave me the Apache directives bellow that I added to the httpd.conf file, after