Hey,
I noticed that CORS seems not to be supported so in chrome you get Access Origin Resource Sharing issues.
It can be solved with setting these headers:
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS'); .. etc..
Is it possible to support CORS in anyway?
I like to run the web on another server
Support CORS - API
Re: Support CORS - API
You can do it your own with proxy server - nginx, or in node.js. Ths is temporairy solution.
Re: Support CORS - API
Thanks for the idea, i am already using haproxy actually for my home net servers. Used haproxy to proxy the 8083 port. Now running the home-automation software in Apache on another production server
Heres the config if anyone is going to use the same:
Heres the config if anyone is going to use the same:
Code: Select all
backend pi_http
server pi 10.0.0.100:8083
frontend homeautomation
mode http
bind *:8083
default_backend pi_http
Re: Support CORS - API
With which URL do you experience whis?
With new automation API we have it:
automation/request.js: this.responseHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
With new automation API we have it:
automation/request.js: this.responseHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');