Page 1 of 1

HTTP API - Cors and JQuery if quey comes from remote host

Posted: 23 Sep 2016 15:18
by Boxson
Hi,

does anybody have a running example of pulling a sensors value from Z-Way HTTP API by javascript from another host?

If i don't add an authentication header to the javascipt request, Z-Way API responds with a 401 - message.
If i add an authentication header so the javascript request, i get a CORS error shown.

Is there a way to have Z-Way API allow javscript based requests from external hosts (e.g. another webserver running at the same network).

Regards

Boxson

Re: HTTP API - Cors and JQuery

Posted: 27 Sep 2016 12:58
by Boxson
I made a commit at git (https://github.com/Z-Wave-Me/home-autom ... 70901a8604) solving this. Shall be available with one of the upcoming releases. If you want to use it before next release, add the single line of code by yourself and restart the Z-Way System.