code for querying cross-domain

This commit is contained in:
ansuz
2016-08-01 15:22:04 +02:00
parent 75170353fe
commit f2c97d8913
3 changed files with 305 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<script data-main="test" src="/bower_components/requirejs/require.js"></script>
<style>
#status { border: 5px solid red; }
#status.working { border: 5px solid green; }
</style>
</head>
<body>
<p>This page opens up an iframe which connects to beta.cryptpad.fr</p>
<p>the idea is that some other subdomain of cryptpad.fr should be able to use this technique to open up a connection
to beta.cryptpad.fr and read from its local storage, so that we can make a seamless transition from beta
to www. or *.cryptpad.fr.</p>
<div id="status">
<p>If this box turns green, you've configured your scripts correctly.</p>
<p>If your scripts are not working correctly, check that:
<ol>
<li>/customize/share/respond.js is configured to respond to requests from your domain (see the validDomains variable)</li>
<li>the script attempting to connect to this endpoint is configured to listen for responses from it (in this case main.js)</li>
</ol>
</div>