make it possible that json.cors be a function so we can check the request origin against a list of allowed origins
use call_user_func to call custom function with the app->request as parameter
Think it's better to call a function with the request origin as parameter
Merge pull request #2 from jwellner/cors

Allow functions for json.cors option