mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-26 04:52:43 +00:00
Added infrastructure for gdb.fyi short domain redirect
This commit is contained in:
25
terraform/shortdns.js
Normal file
25
terraform/shortdns.js
Normal 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,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user