mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-27 19:57:50 +03:00
fix: remove duckduckgo from crawler list
This commit is contained in:
parent
d46ddbe2b4
commit
896681d5b9
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue