betheluniversity / cascade

Implementing Cascade Server
2 stars 1 forks source link

Force other sites to stop iframing our site #767

Open c-schwarze opened 5 years ago

c-schwarze commented 5 years ago

This page is pulling our pages and using an iframe. We should add some code to stop it.

http://www.euni.de/tools/jobpopup.php?lang=en&option=showJobs&jobid=392598&jobtyp=5&university=National+University+of+Ireland+Galway&country=IE&sid=38138

This if statement works to send anything iframing our pages to google. We also need to check who is hosting the page (if possible?). Maybe something like window.top.origin. Otherwise, we will have to find another solution for iframing pages (currently we iframe the covenant).


if (window.location !== window.parent.location) {
        window.location.href = 'https://www.google.com/';
}
</script>```

Also, I am pretty sure it is illegal without our approval. Which means we should tell them to stop.