fuck you edideaur
This commit is contained in:
parent
83403d43a6
commit
4c9f609b75
6 changed files with 222 additions and 168 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
export async function onRequest(context) {
|
export async function onRequest(context) {
|
||||||
const { request } = context;
|
const { request, env } = context;
|
||||||
|
const userAgent = request.headers.get('User-Agent') || '';
|
||||||
|
const isBot = /discordbot|twitterbot|facebookexternalhit|bingbot|googlebot|slurp|whatsapp|pinterest|slackbot|telegrambot|linkedinbot|mastodon|signal|snapchat|redditbot|skypeuripreview|viberbot|linebot|embedly|quora|outbrain|tumblr|duckduckbot|yandexbot|rogerbot|showyoubot|kakaotalk|naverbot|seznambot|mediapartners|adsbot|petalbot|applebot|ia_archiver/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isBot) {
|
||||||
const pageUrl = request.url;
|
const pageUrl = request.url;
|
||||||
|
|
||||||
const metaHtml = `
|
const metaHtml = `
|
||||||
|
|
@ -32,3 +36,8 @@ export async function onRequest(context) {
|
||||||
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
headers: { 'content-type': 'text/html;charset=UTF-8' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const url = new URL(request.url);
|
||||||
|
url.pathname = '/';
|
||||||
|
return env.ASSETS.fetch(new Request(url, request));
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue