How to implement support for cross-domain requests to dm6437?
As I understand for this need to add "Access-Control-Allow-Origin:*" line to header of ajax request. How to do it?
NDK v.1.92.00.22 is used.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
How to implement support for cross-domain requests to dm6437?
As I understand for this need to add "Access-Control-Allow-Origin:*" line to header of ajax request. How to do it?
NDK v.1.92.00.22 is used.
Hi,
Since this thread is based out of DM64x, as a moderator, let me move this post to DM64x forum.
Thanks & regards,
Sivaraj K
//HTTP header
httpSendStatusLine(html_socket, HTTP_OK, CONTENT_TYPE_HTML);
httpSendClientStr(html_socket, "Access-Control-Allow-Origin: * \r\n");
httpSendEntityLength(html_socket, strlen(response));
//HTTP content
httpSendClientStr(html_socket, response);