From 54f9da5c3954a06024b7a6100e8707821e933259 Mon Sep 17 00:00:00 2001 From: flamby Date: Wed, 6 Mar 2013 16:11:18 +0100 Subject: [PATCH] Update vcloud.js how to deal with proxy as in silver lining? thanks in advance. --- www/js/vcloud.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/www/js/vcloud.js b/www/js/vcloud.js index 1572423..5160932 100644 --- a/www/js/vcloud.js +++ b/www/js/vcloud.js @@ -59,6 +59,18 @@ }); // Handler for SDK login method + // Is it there that i should put this code from "silver lining" permitting to deal with + // a proxy (to solve the cross domain issue) + //$.ajaxPrefilter(function(options, originalOptions, jqXHR) { + // options.url = "proxy/" + encodeURIComponent(options.url); + //}); + // but i bet i should have something like this also, right ? + + //$.ajaxPrefilter(function(options, originalOptions, jqXHR) { + // jqXHR.setRequestHeader('x-vcloud-authorization', jqXHR.getResponseHeader('x-vcloud-authorization')); + //}); + // as you see, i'm not at all fluent in js. :-) + vcd.register(vmware.events.cloud.LOGIN, onLogin); // Handlers for SDK refresh of data model