You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/23 17:51:30 UTC

[GitHub] [cordova-plugin-wkwebview-engine] breautek commented on issue #116: I can't load JSON from external server CORS is enabled *

breautek commented on issue #116: I can't load JSON from external server CORS is enabled * 
URL: https://github.com/apache/cordova-plugin-wkwebview-engine/issues/116#issuecomment-545561037
 
 
   Debugging cors problems is very difficult because by design they hide useful error messages.
   
   You might see hints in your server logs. I've used [postman](https://www.getpostman.com/) so that I can send requests manually and see all the response details. Send the `OPTIONS` request to make sure the preflight response returns back the correct headers and content (body size should be exactly 0 bytes).
   
   It should also provide the following http headers:
   `Access-Control-Allow-Origin`
   `Access-Control-Allow-Methods`
   `Access-Control-Allow-Headers`
   
   Origin should be a wildcard because you cannot reference a null origin.
   Allowed methods should be a comma delimited list of http methods, e.g. `POST, GET, OPTIONS`
   Allowed headers should be a comma delimited list of allowed http headers... e.g:
   `Accept, Content-Type, X-Requested-With`
   
   Here is an example of my response headers:
   ![CORSheaders](https://user-images.githubusercontent.com/11200662/67420205-8bc69600-f5a4-11e9-8187-7bd9e43104a4.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org