cross-domain

How to debug CORS error

你离开我真会死。 提交于 2019-12-24 00:36:43
问题 I'm trying to grab an image from Amazon S3 using cross-origin resource sharing so that I can use the canvas.toDataUrl() method. On S3 I set the CORSconfiguration on the bucket to: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*<

Cross-Origin Request Blocked with CORS headers present

♀尐吖头ヾ 提交于 2019-12-23 23:20:35
问题 on the server side I have the following filter in apache which allow all methods and all origins by defaults <filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> </filter> <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Using angular $http One post is working, but another fail failed. The request that fails talks to another app on the same apache. Cross-Origin Request Blocked:

How to request different domain with Ajax in jQuery

拈花ヽ惹草 提交于 2019-12-23 17:47:44
问题 I need to make a request to a different domain with Ajax in jQuery! Should I use iframe ? Edited: On facebook.com working chat, with few different domain name? GET http:// www.facebook.com/ajax/presence/reconnect.php?__a=1&reason=6&iframe_loaded=false&post_form_id=23be2df75b74a0bcb61358814c56ba4f 200 OK GET http://0.50.channel.facebook.com/x/2562941315/4271808869/true/p_1529934952=2 200 OK I want something like... 回答1: You can not because of same origin policy. You have a few options. JSONP

Inserting into an mySQL database from a local html/javascript website

谁说我不能喝 提交于 2019-12-23 15:44:42
问题 What I'm trying to do The intention of my program is to insert data from a local HTML / JS website into an online (non-local) mySQL database. What I've attempted so far The original method I was attempting to utilise to accomplish this was to, have my local website utilise javascript to post data via an online PHP file, then have this PHP file insert this information into a mySQL table. But I kept receiving cross-origin request related errors. After reaching a wall programmatically, I opened

jsonp callback error

感情迁移 提交于 2019-12-23 12:19:26
问题 I'm using firefox addon builder. Running this code errors with "callback is not defined" function callback(data) { window.alert(data.status); } $.ajax({ url: "http://apps.compete.com/sites/google.com/trended/rank/?apikey=210e634a0b3af972daa908a447c735c1&start_date=201112&end_date=201112&jsonp=?", dataType: "jsonp", jsonp: "jsonp", jsonpCallback: "callback" }); This is the api documentation: https://www.compete.com/developer/documentation/ 回答1: I'm assuming that you are running this from a

JQuery - $.ajax() - Cross-origin using JSONP - Getting 'parsererror' only in IE 8 (working in IE 7)

倖福魔咒の 提交于 2019-12-23 10:22:23
问题 I've the following code to do a crossdomain request and get JSONP data (JSON wrapped with by callback method). I've verified that I'm getting the response correctly with the callback method wrapping my JSON data. It is working PERFECTLY in IE7 (the callback cb is getting called) but not in IE8. $(document).ready(function () { var abc = $.ajax({ type: "GET", url: "http://sd.domain.com/param1=a&param2=b&output=json&callback=cb", dataType: "jsonp", jsonp: false, cache: false, success: function

Cross origin GET from local file://

拈花ヽ惹草 提交于 2019-12-23 10:06:15
问题 I'm trying to build an html file to monitor some things on a remote site- specifically, github.com. I'd like to be able to keep it to just that flat file, making the requests straight from the JS to github's API. My thought process went like this: Let's use jsonp, since I only need read access, so sticking with GETs should be fine. That fails because you can't do basic authentication with jsonp. Ok, I'll use Github's OAuth instead of basic authentication! That fails because the browser doesn

How to get height of iframe cross domain

帅比萌擦擦* 提交于 2019-12-23 09:36:39
问题 I have iframe(cross domain) with src from facebook, twitter or etc. I need to get height of iframe but i got issue: "Permission denied to access property 'document'". Please help me to resolve this. Many thanks! 回答1: Couple issues. First, the height of the iframe is likely not what you want. I mean that's set explicitly in the HTML code of the page you control and is readily accessible and modifiable through any Javascript means. What it appears you are after is the height of the page inside

How to set a cookie on a separate domain in Rails

女生的网名这么多〃 提交于 2019-12-23 09:28:03
问题 How can you set a cookie on a different Domain that is calling my site with a javascript call? It works in FF3, but not in IE6. My server is called from a javascript tag on a seperate site and domain. The result returns javascript that populates their page with data (it's a widget). I am trying to set a cookie using domain=".mydomain.com" and path="/". It works for Firefox, but won't work in IE. It works fine in IE if I test the javascript call from my own domain. Does anyone know how to get

Unable to get blueimp/jQuery.fileupload plugin to work

落花浮王杯 提交于 2019-12-23 08:59:29
问题 Am trying use this jQuery plugin for cross domain image uploads jQuery.fileupload I think the plugin uses require.js, which i have already included because i use it load javascript code for my page. The plugin doesnt seem to required that i include require.js, but when i test my page i get this error Uncaught Error: Mismatched anonymous define() module: function ( $, undefined ) { http://requirejs.org/docs/errors.html#mismatch Can someone please point me in the right direction 回答1: You don't