Now with custom opengraph (tm)
continuous-integration/drone/push Build is passing Details

ref #2
This commit is contained in:
Nicolai Ort 2021-09-25 17:35:52 +02:00
parent 6d71a3ebf4
commit 9d7125a311
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 22 additions and 1 deletions

View File

@ -113,7 +113,28 @@ fastify.get('/:shortcode', async (req, res) => {
} }
if(isBot(req.headers['user-agent']) && target[0].no_preview){ if(isBot(req.headers['user-agent']) && target[0].no_preview){
return "Bad Bot!" return `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="LinkyLinky">
<meta property="og:site_name" content="LinkyLinky by Kauft.es">
<meta property="og:url" content="https://kauft.es/">
<meta property="og:description" content="LinkyLinky by Kauft.es is a custom url shortener.
You're reading this, b/c someone doesn't want their shorturl to be indexed by bots/crawlers/spiders.
T">
<meta property="og:type" content="product">
<meta property="og:image" content="https://kauft.es/dashboard/icon_128.png">
<title>LinkyLinky</title>
</head>
<body>
</body>
</html>
`;
} }
res.redirect(302, target[0].target); res.redirect(302, target[0].target);