codeforamerica / naics-api

Basic API to return NAICS codes and information
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

Implement CORS support #13

Closed daguar closed 11 years ago

daguar commented 11 years ago

I left some thoughts in Campfire, but this post shows how to implement CORS support on a NodeJS server: http://senecacd.wordpress.com/2013/02/15/enabling-cors-on-a-node-js-server-same-origin-policy-issue/

CORS is all about serving with the appropriate headers; nothing is required on the client side beyond making a normal AJAX request across domains to test.

louh commented 11 years ago

Solved w/ help from http://stackoverflow.com/questions/14338683/how-can-i-support-cors-when-using-restify