feat: log /nudes access
This commit is contained in:
parent
53321427ce
commit
e0c4f059e0
3 changed files with 11 additions and 1 deletions
|
@ -91,7 +91,11 @@ export function PageMain(props: {
|
||||||
<div>
|
<div>
|
||||||
-
|
-
|
||||||
{' '}
|
{' '}
|
||||||
<Link href={item.link} target="_blank">
|
<Link
|
||||||
|
href={item.link}
|
||||||
|
target="_blank"
|
||||||
|
data-astro-prefetch={item.noPrefetch ? 'false' : undefined}
|
||||||
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
</Link>
|
</Link>
|
||||||
:
|
:
|
||||||
|
|
|
@ -26,6 +26,7 @@ export const SUBLINKS = [
|
||||||
title: 'nudes',
|
title: 'nudes',
|
||||||
subtitle: '( ͡° ͜ʖ ͡°)',
|
subtitle: '( ͡° ͜ʖ ͡°)',
|
||||||
comment: 'a lot of them, actually',
|
comment: 'a lot of them, actually',
|
||||||
|
noPrefetch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: '/cheerio/index.html',
|
link: '/cheerio/index.html',
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import type { APIRoute } from 'astro'
|
import type { APIRoute } from 'astro'
|
||||||
|
import { html } from '@mtcute/node'
|
||||||
|
|
||||||
import { isBotUserAgent } from '~/backend/utils/bot'
|
import { isBotUserAgent } from '~/backend/utils/bot'
|
||||||
|
import { telegramNotify } from '../backend/bot/notify'
|
||||||
|
import { getRequestIp } from '../backend/utils/request'
|
||||||
|
|
||||||
const HTML = `
|
const HTML = `
|
||||||
<html>
|
<html>
|
||||||
|
@ -23,6 +26,8 @@ export const GET: APIRoute = async (ctx) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
telegramNotify(html`someone (ip ${getRequestIp(ctx)}) got rickrolled >:3`)
|
||||||
|
|
||||||
return new Response(null, {
|
return new Response(null, {
|
||||||
status: 302,
|
status: 302,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in a new issue