Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A7F118A5D for ; Thu, 10 Sep 2015 08:41:46 +0000 (UTC) Received: (qmail 3787 invoked by uid 500); 10 Sep 2015 08:41:46 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 3754 invoked by uid 500); 10 Sep 2015 08:41:46 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 3734 invoked by uid 99); 10 Sep 2015 08:41:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2015 08:41:45 +0000 Date: Thu, 10 Sep 2015 08:41:45 +0000 (UTC) From: "Shazron Abdullah (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (CB-7348) [WKWebView] pages that are loaded using file:/// urls respect CORS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-7348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah reopened CB-7348: ---------------------------------- > [WKWebView] pages that are loaded using file:/// urls respect CORS > ------------------------------------------------------------------ > > Key: CB-7348 > URL: https://issues.apache.org/jira/browse/CB-7348 > Project: Apache Cordova > Issue Type: Sub-task > Components: iOS > Environment: iOS 8 > Reporter: Shazron Abdullah > Assignee: Shazron Abdullah > Labels: cordova-ios-4.0.x > > Not a complaint but an advisory, this is the opposite of what happens in a UIWebView, where a page loaded locally is not restricted to CORS and can do whatever it wants. > Try xhr to a local server using: https://gist.github.com/enjalot/2904124 > Note that it works with the wildcard of course. By default, file:// urls give the Origin: header as null. > The only solution is, the destination server MUST return the header "Access-Control-Allow-Origin" that matches the wildcard or "null". > So what is the alternative? Run a local proxy. The PhoneGap Developer App does this transparently: https://github.com/phonegap/phonegap-app-developer by overriding XMLHttpRequest.open -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org