Closed elogicmedia closed 8 years ago
That should be the proper syntax. I just tried it myself with multiple controllers, and it worked properly:
DispatcherFactory::add('Cors.Cors', ['routes' => [
'Members', 'Clubs', 'AuditDeltas'
]]);
I'm afraid I don't have any other specific debugging suggestions off the top of my head.
Thanks for the reply, the issue ended up being within my cake app and not your plugin. Sorry about that.
How do I go about adding CORS for multiple controllers?
Single works like this as per your example for me no worries:
DispatcherFactory::add('Cors.Cors', ['routes' => [ 'Employees' ]]);
HOWEVER trying this for multiple controlers doesn't? I guess this is wrong.
DispatcherFactory::add('Cors.Cors', ['routes' => [ 'Employees', 'LabourLevels' ]]);
Thanks