You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Darryl Pogue (JIRA)" <ji...@apache.org> on 2019/04/06 06:01:00 UTC
[jira] [Closed] (CB-13227) Http [post] is getting [option] on
rails.
[ https://issues.apache.org/jira/browse/CB-13227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darryl Pogue closed CB-13227.
-----------------------------
Resolution: Invalid
This is due to [CORS|https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]. You'll need to configure your server to respond to {{OPTIONS}} requests with the correct headers.
> Http [post] is getting [option] on rails.
> -------------------------------------------
>
> Key: CB-13227
> URL: https://issues.apache.org/jira/browse/CB-13227
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-cli, cordova-ios
> Affects Versions: cordova@7.0.0
> Environment: Server APi - ruby '2.1.6'
> gem 'rails', '4.1.1'
> iOS - cordova - 7.0.1
> Reporter: Arun
> Assignee: Shazron Abdullah
> Priority: Major
>
> Hi,
> I have app running on following versions-
> node: node 4.3.0
> phonegap: phonegap 5.3.1
> Platform:
> Cordova 3.4.0
> cordova-android 3.6.3, cordova-ios 3.9.1
> Framework: Backbone 1.1.2
> Tests: Phantom/Jasmine 1.2.0
> But when i updated with the latest versions-
> node- v8.4.0
> cordova- 7.0.1
> android 6.2.3
> ios 4.4.0
> Content-type- application/json
> When calling post api from the app, its processing as [option] not post and getting error - XMLHttpRequest cannot load. Preflight response is not successful.
> using -
> cordova-plugin-whitelist 1.3.2 "Whitelist"
> And in config.xml-
> <allow-navigation href="*" />
> <allow-intent href="*"/>
> <access origin="*" />
> is also added.
> Meta tag in index-
> <meta http-equiv="Content-Security-Policy" content="default-src * gap: file:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src * 'unsafe-inline' 'unsafe-eval' ws: wss:;">
> what i am missing, can you suggest?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org