contributte / apitte

:wrench: An opinionated and enjoyable API framework based on Nette Framework. Supporting content negotiation, debugging, middlewares, attributes, annotations and loving openapi/swagger.

Home Page:https://contributte.org/packages/contributte/apitte/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ClientErrorException - how to modify headers?

vylink opened this issue · comments

Hi,

Is it possible to modify response headers for ClientErrorException?
Error Response is not delivered to the browser because of CORS :( Any advice?

Cheers

From #96 I see you use ResponseDecorator. Just implement IErrorDecorator, it should be enough.
https://github.com/apitte/core/blob/master/src/Decorator/IErrorDecorator.php#L19

Many thanks. It works perfectly.