Added infrastructure for gdb.fyi short domain redirect

This commit is contained in:
Jocelyn Badgley (Twipped)
2023-02-19 12:59:03 -08:00
parent 77bd70819a
commit 19655a1e99
3 changed files with 257 additions and 0 deletions

25
terraform/shortdns.js Normal file
View File

@@ -0,0 +1,25 @@
exports.handler = async () => {
const body = `
<!DOCTYPE html>
<html lang="en">
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>CloudFront Lambda@Edge</center>
</body>
</html>
`;
return {
status: '301',
statusDescription: `Redirecting to www domain`,
headers: {
location: [ {
key: 'Location',
value: `https://genderdysphoria.fyi`,
} ],
},
body,
};
};