Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
trying to fix cross domain accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangSt committed Apr 1, 2011
1 parent 72ab241 commit ab9400b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions policy.xml → crossdomain.xml
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="github.com" />
<allow-access-from domain="github.com" secure="false" />
<allow-http-request-headers-from domain="github.com" headers="*" />
<allow-access-from domain="igniteinteractivestudio.github.com" />
<allow-access-from domain="igniteinteractivestudio.github.com" secure="false" />
<allow-http-request-headers-from domain="igniteinteractivestudio.github.com" headers="*" />
</cross-domain-policy>
16 changes: 13 additions & 3 deletions sample.html
Expand Up @@ -15,13 +15,23 @@
<link type="text/css" rel="stylesheet" href="syntax/styles/shCoreDefault.css"/>
<script type="text/javascript">

Request.flXHRproxy.registerOptions("http://github.com/IgniteInteractiveStudio",{instancePooling:true,autoUpdatePlayer:true,xmlResponseText:false,loadPolicyURL:"http://igniteinteractivestudio.github.com/SLSharp/policy.xml"});
Request.flXHRproxy.registerOptions(
"https://github.com/IgniteInteractiveStudio/SLSharp",
{
instancePooling:true,
autoUpdatePlayer:true,
xmlResponseText:false,
onerror: function(err)
{
alert('x');
}
});

function LoadSource(src, element)
{
var myRequest = new Request({
method: 'get',
url: 'http://github.com/IgniteInteractiveStudio/SLSharp/raw/master/' + src,
url: 'https://github.com/IgniteInteractiveStudio/SLSharp/raw/master/' + src,
onSuccess: function(responseText)
{
$(element).innerHTML = responseText;
Expand All @@ -30,7 +40,7 @@
onFailure: function()
{
$(element).innerHTML = "// oops something went wrong when fetching\n" +
'http://github.com/IgniteInteractiveStudio/SLSharp/raw/master/' + src;
'https://github.com/IgniteInteractiveStudio/SLSharp/raw/master/' + src;
SyntaxHighlighter.highlight({}, $(element));
}
});
Expand Down

0 comments on commit ab9400b

Please sign in to comment.