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>
|
||||
-
|
||||
{' '}
|
||||
<Link href={item.link} target="_blank">
|
||||
<Link
|
||||
href={item.link}
|
||||
target="_blank"
|
||||
data-astro-prefetch={item.noPrefetch ? 'false' : undefined}
|
||||
>
|
||||
{item.title}
|
||||
</Link>
|
||||
:
|
||||
|
|
|
@ -26,6 +26,7 @@ export const SUBLINKS = [
|
|||
title: 'nudes',
|
||||
subtitle: '( ͡° ͜ʖ ͡°)',
|
||||
comment: 'a lot of them, actually',
|
||||
noPrefetch: true,
|
||||
},
|
||||
{
|
||||
link: '/cheerio/index.html',
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import type { APIRoute } from 'astro'
|
||||
import { html } from '@mtcute/node'
|
||||
|
||||
import { isBotUserAgent } from '~/backend/utils/bot'
|
||||
import { telegramNotify } from '../backend/bot/notify'
|
||||
import { getRequestIp } from '../backend/utils/request'
|
||||
|
||||
const 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, {
|
||||
status: 302,
|
||||
headers: {
|
||||
|
|
Loading…
Reference in a new issue