41fd848fa0
Some HTML files were importing iframe_api.js automatically by detecting the referrer document. While this was done in a safe way (the map container does not use cookies), it is not a best practice to load a script originating from document.referrer. This PR solves the issue by using PHP to inject the correct domain name in the HTML files.
16 lines
563 B
PHP
16 lines
563 B
PHP
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="<?php echo $_SERVER["FRONT_URL"] ?>/iframe_api.js"></script>
|
|
<script>
|
|
window.addEventListener('load', () => {
|
|
WA.room.setProperty('iframeTest', 'openWebsite', 'https://www.wikipedia.org/');
|
|
WA.room.setProperty('metadata', 'openWebsite', 'https://www.wikipedia.org/');
|
|
})
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>Change the url of this iframe and add the 'openWebsite' property to the red tile layer</p>
|
|
</body>
|
|
</html>
|