[
https://issues.apache.org/jira/browse/SHINDIG-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700396#action_12700396
]
Paul Lindner commented on SHINDIG-1022:
---------------------------------------
Here's a simple fix.. Anyone think it can be done better?
Index: javascript/samplecontainer/samplecontainer.js
===================================================================
--- javascript/samplecontainer/samplecontainer.js (revision 765858)
+++ javascript/samplecontainer/samplecontainer.js (working copy)
@@ -150,7 +150,10 @@
for (var i = 0; i < metadata.gadgets.length; i++) {
gadget = gadgets.container.createGadget(
{'specUrl': metadata.gadgets[i].url, 'title':
metadata.gadgets[i].title});
- gadget.setServerBase('../../');
+ // replace localhost with 127.0.0.1 to simulate cross-domain
+ var iframeBaseUrl = baseUrl.replace("localhost", "127.0.0.1") + '../../';
+
+ gadget.setServerBase(iframeBaseUrl);
gadget.secureToken = escape(generateSecureToken());
gadgets.container.addGadget(gadget);
}
> Use separate domain names for iframes on sample container
> ---------------------------------------------------------
>
> Key: SHINDIG-1022
> URL: https://issues.apache.org/jira/browse/SHINDIG-1022
> Project: Shindig
> Issue Type: Improvement
> Components: Javascript
> Affects Versions: trunk
> Reporter: Paul Lindner
> Assignee: Paul Lindner
>
> When using the sample container we really don't test the RPC mechanisms.
> This is because the generated iframe is on the same domain as the container.
> This can cause bugs because regular RPC mechanisms serialize the javascript
> objects whereas same-domain calls just pass a reference. For samplecontainer
> we can use localhost for the container and 127.0.0.1 for the iframe to enact
> this testing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.