phalt/pokeapi — pull request #19 by theoperatore (2014-12-06 23:09:34+00:00)
Title: added CORS middleware with basic installation / tests for v1 & v2 apis

Heyo!

Thought I'd try to add in CORS headers to the wonderful pokeapi. I found a [repo](https://github.com/ottoyiu/django-cors-headers) that adds in 'Access-Control-Allow-Origin' headers to responses as a django package.

I'm not too familiar with django (or python for that matter), so let me know if anything should be changed to fit your programming ethic (or anything on style too!).

Check out the tests too. It shouldn't matter which test your run—either api v1 or v2—the test makes sure that the response header is present for a request from a different origin. I've used my domain( anpetersen.me ) as the sample different origin and both tests have passed on my local machine (and using curl too).

Let me know!

Thanks,

Alex