I used that to bypass CORS.
I'm pasting the code and the configuration I used works:
100-domoticz.conf
Code: Select all
server.modules += ( "mod_proxy" )
$HTTP["remoteip"] !~ "192.168.2.|10.10.0." {
$HTTP["url"] =~ "/json.htm" {
url.access-deny = ( "" )
}
}
proxy.header = (
"map-urlpath" => (
"/json.htm" => "/json.htm"
)
)
$HTTP["url"] =~ "^/json\.htm($|\?)" {
proxy.server = (
"" => (
(
"host" => "192.168.2.1",
"port" => 8080
)
)
)
setenv.add-response-header = (
"Access-Control-Allow-Origin" => "*",
"Access-Control-Allow-Methods" => "GET, POST, OPTIONS",
"Access-Control-Allow-Headers" => "Content-Type, Authorization"
)
}
Regarding Dynamic Dashboards, I'm starting to use it, but to adapt it to my tablet, a few important elements are still missing:
1) security panel widget
2) dashboard switch button (the swipe left/right to switch dashboards on older tablets isn't very responsive).
3) block device hide_data customization (on a 10-inch tablet, with all that information, the dashboard fills the entire screen).
In any case, you're on the right track. Keep up the development!