Implement domain restriction script in index.html

Added a script to restrict access based on allowed domains.
This commit is contained in:
2025-11-07 09:14:20 -06:00
committed by GitHub
parent f64b60e1aa
commit 1d7cb6d43f
+13
View File
@@ -1,6 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
(function() {
const allowedDomains = [
"give-this-a-new-name.onrender.com/",
"give-this-a-new-name.onrender.com/index.html"
];
const loc = window.location.hostname + window.location.pathname;
const isAllowed = allowedDomains.some(urlPart => loc.endsWith(urlPart));
if (!isAllowed) {
window.location.href = "https://give-this-a-new-name.onrender.com/index.html";
}
})();
</script>
<script defer src="https://chirpy.dev/bootstrapper.js" data-chirpy-domain="fun-miles-4jub.onrender.com"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">