Closed boxidau closed 10 years ago
So I've found that in ZF\Rest\RestController->onDispatch if an ApiProblem is returned from a dispatched method then a new ApiProblemResponse is returned and the existing response object is overwritten.
Perhaps some sort of header whitelist needs to be implemented here to copy selected headers from the existing response?
Sorry if this is a stupid suggestion, I haven't been working in Zend for very long at all :( and I'm certain that there will be a better place for this to occur.
Hi,
I'm having an issue where zfr-cors doesn't seem to be given the chance to add its headers if a resource controller returns an ApiProblem. Causing API requests from browsers to fail with an XMLHttpRequest error rather than allowing the application to handle the API failure gracefully.