Now with custom opengraph (tm)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
ref #2
This commit is contained in:
parent
6d71a3ebf4
commit
9d7125a311
|
@ -113,7 +113,28 @@ fastify.get('/:shortcode', async (req, res) => {
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue