Hi Luiz,


Can you identify what is going on when it is working and what is going
on when it is not?


Take a look at ERXRouteController and its optionsAction() method.



I typically have a default route controller class (extends
ERXDefaultRouteController) for all of my controllers in my applications
or frameworks where you can fine tune the headers to be read and
written, as well as control other authentication routines, etc.


Depending on how you want to deal with CORS, preflight, and limiting
HTTP methods at your end points, that method might point you in the
right direction.


Regards,



--

Matt

http://logicsquad.net





On Tue, Jan 24, 2017, at 11:45 PM, Luiz Alfredo Carrara Bertusso wrote:
> I`ve been setting the option method for all possible routes on the API
> I`m working on, but sometimes it works and sometimes it doesn't.
> Nowadays I have to do this for every route:

> 

> 

> restRequestHandler.addRoute(new ERXRoute(MyEntity.ENTITY_NAME,
> "/MyRoute",                          ERXRoute.Method.Options,
> MyController.class, "options"));
> 

> 

> My concern is if it`s possible to apply this route for every declared
> route just once and the framework automatically handles this.
> 

> Thank you.

> _________________________________________________

> Do not post admin requests to the list. They will be ignored.

> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)

> Help/Unsubscribe/Update your Subscription:

> https://lists.apple.com/mailman/options/webobjects-dev/matt%40logicsquad.net
>  

> This email sent to m...@logicsquad.net


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to