fix: remove duckduckgo from crawler list

pull/1130/head^2
Daniel Roe 2023-01-15 00:47:11 +00:00
rodzic d46ddbe2b4
commit 896681d5b9
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -10,7 +10,9 @@ export default defineNuxtPlugin(async (nuxtApp) => {
if (!userAgent)
return
const isOpenGraphCrawler = /twitterbot|discordbot|facebookexternalhit|googlebot|msnbot|baidu|ahrefsbot|duckduckgo/i.test(userAgent)
if (isOpenGraphCrawler)
const isOpenGraphCrawler = /twitterbot|discordbot|facebookexternalhit|googlebot|msnbot|baidu|ahrefsbot/i.test(userAgent)
if (isOpenGraphCrawler) {
// Redirect bots to the original instance to respect their social sharing settings
await sendRedirect(nuxtApp.ssrContext!.event, `https:/${route.path}`, 301)
}
})