Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS header missing #66

Open
westwood846 opened this issue Jun 6, 2019 · 2 comments
Open

CORS header missing #66

westwood846 opened this issue Jun 6, 2019 · 2 comments

Comments

@westwood846
Copy link

So my Angular app started throwing CORS errors today and sure enough, checking with curl there's no Access-Control-Allow-Origin: * header present on the response. I'm sure it has been there before because #36 mentions adding the header and my app used to be able to talk to the API before.

curl -X GET -G https://api.nal.usda.gov/ndb/search -d "api_key=ABDC1234" -d "q=broccoli" -v:

< HTTP/1.1 200 
< Server: openresty
< Date: Thu, 06 Jun 2019 05:15:17 GMT
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Vary: Accept-Encoding
< X-RateLimit-Limit: 3600
< X-RateLimit-Remaining: 3544
< Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
< Age: 0
< Via: https/1.1 api-umbrella (ApacheTrafficServer [cMsSf ])
< X-Cache: MISS
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Can we get this re-enabled?

@littlebunch
Copy link

littlebunch commented Jun 6, 2019 via email

@westwood846
Copy link
Author

Can confirm, the header is present and my app is working again. Thanks for the quick response!

The new FDC API has the header already enabled, should I still post this to the list? Also, will this issue tracker apply to the new API as well or is it only that contact form for now?

Maybe we could add the above notice to the readme so it does not get buried when this issue gets closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants