{"action":"created","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/932","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/932/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/932/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/932/events","html_url":"https://github.com/WP-API/WP-API/issues/932","id":59085491,"number":932,"title":"When is json_serve_request filter applied for CORS?","user":{"login":"lancemonotone","id":6776069,"avatar_url":"https://avatars.githubusercontent.com/u/6776069?v=3","gravatar_id":"","url":"https://api.github.com/users/lancemonotone","html_url":"https://github.com/lancemonotone","followers_url":"https://api.github.com/users/lancemonotone/followers","following_url":"https://api.github.com/users/lancemonotone/following{/other_user}","gists_url":"https://api.github.com/users/lancemonotone/gists{/gist_id}","starred_url":"https://api.github.com/users/lancemonotone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lancemonotone/subscriptions","organizations_url":"https://api.github.com/users/lancemonotone/orgs","repos_url":"https://api.github.com/users/lancemonotone/repos","events_url":"https://api.github.com/users/lancemonotone/events{/privacy}","received_events_url":"https://api.github.com/users/lancemonotone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T15:07:45Z","updated_at":"2015-02-27T00:05:45Z","closed_at":null,"body":"I'm having trouble understanding when the `json_serve_request` filter is applied during a request. The filter is added in **json-rest-api/plugin.php:406** and points to a function called `json_send_cors_headers`, which is defined at **:694**. As far as I can tell though, at no time during the request is `apply_filters('json_serve_request')` called and as such, the CORS headers are never sent. Am I wrong about this?"},"comment":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/76303125","html_url":"https://github.com/WP-API/WP-API/issues/932#issuecomment-76303125","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/932","id":76303125,"user":{"login":"rmccue","id":21655,"avatar_url":"https://avatars.githubusercontent.com/u/21655?v=3","gravatar_id":"","url":"https://api.github.com/users/rmccue","html_url":"https://github.com/rmccue","followers_url":"https://api.github.com/users/rmccue/followers","following_url":"https://api.github.com/users/rmccue/following{/other_user}","gists_url":"https://api.github.com/users/rmccue/gists{/gist_id}","starred_url":"https://api.github.com/users/rmccue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmccue/subscriptions","organizations_url":"https://api.github.com/users/rmccue/orgs","repos_url":"https://api.github.com/users/rmccue/repos","events_url":"https://api.github.com/users/rmccue/events{/privacy}","received_events_url":"https://api.github.com/users/rmccue/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T00:05:45Z","updated_at":"2015-02-27T00:05:45Z","body":"Hmm, I'll look into this, it may be a regression."}}