OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/perl -wT |
| 2 use strict; |
| 3 |
| 4 print "Content-Type: text/html\n"; |
| 5 print "Access-Control-Allow-Credentials: true\n"; |
| 6 print "Access-Control-Allow-Origin: http://127.0.0.1:8000\n\n"; |
| 7 |
| 8 print <<EOF |
| 9 <html><body> |
| 10 <script> |
| 11 thisDocument = document.currentScript.ownerDocument; |
| 12 function loadScriptFrom(url) { |
| 13 var element = thisDocument.createElement("script"); |
| 14 element.setAttribute("crossorigin", ""); |
| 15 element.setAttribute("src", url); |
| 16 thisDocument.head.appendChild(element); |
| 17 return element; |
| 18 } |
| 19 |
| 20 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/external-script.js')
; |
| 21 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/cors-js.cgi'); |
| 22 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/cors-js-for-localhos
t.cgi'); |
| 23 window.setTimeout(function() { loadScriptFrom('run-check.js'); }, 100); |
| 24 </script> |
| 25 </body></html> |
| 26 EOF |
OLD | NEW |