Traccar CORS configuration

FdoHdez7 years ago

Hello. I'm coding an Ionic Client for Traccar. I just have faced with CORS issue. Reading on this forum I found it is needed to setting up Traccar in order to enabling CORS.

I already added this line to default.xml (Traccar's version: 3.11): <entry key=’web.origin’>*</entry>,

What else should I config at the server's side?
It is needed something else (like special headers) being send it from client's side?
It is needed some special configuration at the client's side?

Any help with this will be very very appreciated.

Anton Tananaev7 years ago

It is recommended (and required for some requests) to set Accept header to "application/json", if request is supposed to return JSON.

FdoHdez7 years ago

Ok. Thank you very much.