cross-domain

Mobile apps - Cross-domain AJAX [duplicate]

强颜欢笑 提交于 2019-12-24 14:15:56
问题 This question already has answers here : Origin is not allowed by Access-Control-Allow-Origin (18 answers) Closed 6 years ago . I am trying to design some software to be distributed on private mobile devices (Android, iOS etc). I would like to write the software with HTML/CSS/JavaScript and use something like Sencha Touch, PhoneGap or similar. The software needs to write to a local database on the device and when it gets connectivity, post the data (securely) to a remote database on a web

Send cross domain HTTP Post with HTML forms

*爱你&永不变心* 提交于 2019-12-24 13:31:15
问题 I have this HTML form that I need to do some processing before submitting: <form action="http://appid.appspot.com/api/foo" id="contact-form" method="post" name="contact-form"> <fieldset> <label><input name="email" onblur= "if(this.value=='') this.value='Email'" onfocus= "if(this.value =='Email' ) this.value=''" value="Email"></label> <label><input name="subject" onblur= "if(this.value=='') this.value='Subject'" onfocus= "if(this.value =='Subject' ) this.value=''" value="Subject"></label>

JavaScript solution to detect if third party cookie is disabled [duplicate]

喜夏-厌秋 提交于 2019-12-24 11:43:52
问题 This question already has answers here : Check if third-party cookies are enabled (5 answers) Closed 5 years ago . My ultimate requirement is to detect if third party is enabled for the client browser because my payment gateway has a different scenario for browsers with disabled third party cookies. I tried setting up google cookies from within an iframe within my page as below: <iframe src="http://www.google.com" frameborder="0" style="border:0; display:none;"></iframe> and was able to

net::ERR_CONNECTION_TIMED_OUT error in request from cordova app on real device

回眸只為那壹抹淺笑 提交于 2019-12-24 11:34:56
问题 I have an application which runs well on chrome browser and on (genymotion) emulator. However, if i run it on my smartphone, each request to server (post, get, put) gives the result : Failed to load resource: net::ERR_CONNECTION_TIMED_OUT My settings: Cordova: 5.2.0 config.xml: <content src="index.html" /> <access origin="*" /> <allow-navigation href="*" /> <allow-intent href="*" /> jquery: $.support.cors=true; my request: (i've done the same also with backbone, the same result) $scope

Calling a WCF service with jQuery ajax

穿精又带淫゛_ 提交于 2019-12-24 11:29:33
问题 I created a WCF service with a method declared as follows [OperationContract] [WebInvoke(UriTemplate="getDashBoard", Method="POST", BodyStyle=WebMessageBodyStyle.WrappedRequest, RequestFormat=WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json)] getDashBoard object (string strGroups); which returns a List<Dictionary String, Object> rows = new List<Dictionary String, Object>(); serialized by JavaScriptSerializer serializer.Serialize ( rows) ; client-side i call the webservice method in

Https and http Image URL Not loading in silverlight

◇◆丶佛笑我妖孽 提交于 2019-12-24 11:04:57
问题 in my silverlight application i have two image tags one is with http image url and other one is https image url in local system the http enabled image url is loading but the https image url is not loading. when i host the application in https enabled site, it displays the https enabled image url but not displaying the http enabled imageurl how to handle this issue. my client access policy : <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http

Two ASP.NET web applications - Cross origin request always succeeds without discretion

柔情痞子 提交于 2019-12-24 10:46:07
问题 I created a new solution with two ASP.NET web applications, one MVC application and one Web API. I wanted to access the api using a subdomain like api.hybridwebapp.com/values so I implemented an IHttpRouteConstraint to ensure request.RequestUri.Host == "api.mydomain.com" on all Api routes. More details in this answer. Then I added the following line to my host files: 127.0.0.1 hybridwebapp.com api.hybridwebapp.com In IIS Manager I created 2 websites (one for each project) and set the

cross-domain image for three.js (canvas/webGL), proxy?

ぐ巨炮叔叔 提交于 2019-12-24 10:45:59
问题 I realize this may not be possible... I've been scouring around and trying out different things to no avail, but I thought it might merit a post before giving up... I'm putting together an app that uses three.js (webGL) and I would like to give the user the option to input a URL to any image on the web and use that to texture a 3D object in the web app. This would be no problem if not for the whole cross-domain security issue. I know there are supposed to be some work arounds for CORS

Cookie domain with 302 redirect

回眸只為那壹抹淺笑 提交于 2019-12-24 09:18:46
问题 Let's say I have two servers: a) http://server-a.com b) http://server-b.com Server a has the following endpoints: 1) method: GET path: / 2) method: GET path: /do-something When a http get request is made to endpoint 1 , it responds with a header value: Set-Cookie: cookie:0834u50lksdjfbuttonmashlkjdsf; Path=/; Domain=.server-a.com; HTTPOnly When a request is made to endpoint 2 , it responds with a 302 redirect to server b . If a request is made to endpoint 1 and then directly after that

How to understand if page is loaded as iframe (external site) using javascript?

[亡魂溺海] 提交于 2019-12-24 08:48:02
问题 I'm trying to find a reliable solution to determine if my page was loaded in iframe on external site using javascript. If iframe src located on the same domain it's preaty easy: you can use if (window.frameElement) or if (window.location !== window.parent.location) but if iframe src is not on the same domain all modern browsers throw exception when accessing parent and even comparing it with null. I'm totally lost. 回答1: You might be interested in the Coding Horror entry: We Done Been Framed.