Hi Pat, good question. Can you use the web inspector in a browser and tell me what the value is for the Allow-Access-Control-Origin header on the response?
Also, it would help to know which environment you are testing this in. Are you in PhoneGap/Cordova or testing from a browser? Knowing which one and which version would help :)
Cheers,
Tim
Hi Tim,I'm using Google Chrome : Version 27.0.1453.94 mHere is my request:
- GET http://wfm4sqcontests-test.apigee.net/v1/stores?access_token=0sl3oq6UYSzCJ7SfmeRDNngmTRb0&limit=1000 HTTP/1.1 Pragma: no-cache Accept: */* Referer: http://localhost/ Origin: http://localhost Cache-Control: no-cache User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
there is no response, the browser blocks it:
XMLHttpRequest cannot load http://wfm4sqcontests-test.apigee.net/v1/stores?access_token=0sl3oq6UYSzCJ7SfmeRDNngmTRb0&limit=1000. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
I'm just checking the TRACE function now, and I'm realizing that this is just my browser misbehaving... I'm not sure how to correct/fix this without disabling the browser security, but that is not an option for my users.This is the response that TRACE is telling me Apigee is sending for the request (which the browser never receives this response)
- Access-Control-Allow-Headers: origin
- Access-Control-Allow-Origin: *.wfm.pvt
- Date: Thu, 06 Jun 2013 16:11:16 GMT
- Content-Length: 315335
- Access-Control-Max-Age: 3628800
- Set-Cookie: CAKEPHP=lir6q4ks36b5nm2i4d2kbamsh4; expires=Thu
- Access-Control-Allow-Methods: GET
- Connection: keep-alive
- Content-Type: application/json
- Server: nginx/1.1.19
- X-Powered-By: PHP/5.3.10-1ubuntu3.6
--
You received this message because you are subscribed to a topic in the Google Groups "App Craft" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/app-craft/P33YH7Cmj8A/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to app-craft+...@googlegroups.com.
To post to this group, send email to app-...@googlegroups.com.
Visit this group at http://groups.google.com/group/app-craft?hl=en.