apache mod_proxy for cross-domain ajax calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Happy New Years all!

Here is my problem/question:

I have two webservers, see info below
Web1 - 192.168.7.253 – Main webserver with Apache
Web2 - 192.168.7.63 – Webcam with built in webserver that can be configured using cgi commands
On web1 I have the following _javascript_ which does a GET to web2 and send the cgi commands
xmlhttp.open("GET","http://192.168.7.63:8122/set_alarm.cgi?motion_armed=1&schedule_enable=1",true);
Im getting a cross-domain error and I have confirmed that when I enable cross domain in Chrome everything works great but I want this to work on a tablet which doesn't have the enable cross domain option.
I have been trying to use mode_proxy but with no success. One thing that is making this more difficult is the text after the :8122 in the XMLhttp:open will change depending on what options the user selects so I need to preserve this. I also only want to reverse proxy the above line and have everything else be excluded.
I thought that if I changed the ip address in the XMLhttp:open to web1 then use the following
ProxyPreserveHost on
ProxyPassMatch ^http://192.168.7.253:8122$ http://192.168.7.63:8122/$1
but this doesn't work. I have tried many variations but no luck.
Any suggestions?


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux