{"action":"created","issue":{"url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/34","labels_url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/34/comments","events_url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/34/events","html_url":"https://github.com/barryvdh/laravel-cors/issues/34","id":62684799,"number":34,"title":"Using custom response format","user":{"login":"kitensei","id":1045164,"avatar_url":"https://avatars.githubusercontent.com/u/1045164?v=3","gravatar_id":"","url":"https://api.github.com/users/kitensei","html_url":"https://github.com/kitensei","followers_url":"https://api.github.com/users/kitensei/followers","following_url":"https://api.github.com/users/kitensei/following{/other_user}","gists_url":"https://api.github.com/users/kitensei/gists{/gist_id}","starred_url":"https://api.github.com/users/kitensei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitensei/subscriptions","organizations_url":"https://api.github.com/users/kitensei/orgs","repos_url":"https://api.github.com/users/kitensei/repos","events_url":"https://api.github.com/users/kitensei/events{/privacy}","received_events_url":"https://api.github.com/users/kitensei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-18T12:43:59Z","updated_at":"2015-03-18T12:46:30Z","closed_at":null,"body":"Is it possible to catch the responses from the middleware (403, 500) and transform the response to a json response ?\r\n\r\nI am actually using this module for an API and when the CORS are wrong, I simply get a plain text message instead of the expected json"},"comment":{"url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/comments/82954242","html_url":"https://github.com/barryvdh/laravel-cors/issues/34#issuecomment-82954242","issue_url":"https://api.github.com/repos/barryvdh/laravel-cors/issues/34","id":82954242,"user":{"login":"barryvdh","id":973269,"avatar_url":"https://avatars.githubusercontent.com/u/973269?v=3","gravatar_id":"","url":"https://api.github.com/users/barryvdh","html_url":"https://github.com/barryvdh","followers_url":"https://api.github.com/users/barryvdh/followers","following_url":"https://api.github.com/users/barryvdh/following{/other_user}","gists_url":"https://api.github.com/users/barryvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/barryvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barryvdh/subscriptions","organizations_url":"https://api.github.com/users/barryvdh/orgs","repos_url":"https://api.github.com/users/barryvdh/repos","events_url":"https://api.github.com/users/barryvdh/events{/privacy}","received_events_url":"https://api.github.com/users/barryvdh/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T12:46:30Z","updated_at":"2015-03-18T12:46:30Z","body":"Laravel 5? In a recent commit it's possible to catch an error response also, but this isn't in a stable version yet."}}