Closed ejbaker closed 9 years ago
When no slave matching
appears, it should skip XDomain. In order to hook ajax requests, XHook must replace the entire XMLHttpRequest
object. I can't say where things are going wrong based on those logs, can you make a live demo reproducing this? (Please use unminified versions of all included scripts)
As a hacky work around in the meantime, you could initially xhook.disable()
, then for every request:
xhook.enable();
$.ajax(...);
xhook.disable();
In production, the page where I'm using xdomain also makes other requests I can't control. (ad units) With debug mode set, I get the following messages:
xdomain (http://stage.www.example.com): adding slave: http://subdomain.example.com:3000 xdomain (http://stage.www.example.com): no slave matching: 'http://diffsubdomain.diffdomain.com'
and at this point, the script shuts down.
Is there any way to constrain xdomain so that it will only attempt to proxy requests directed at its slave?