cloudlfare

This commit is contained in:
will
2026-04-02 23:29:59 +01:00
parent 746e51370d
commit c76f66c0fd
6 changed files with 154 additions and 16 deletions

View File

@@ -89,7 +89,7 @@ export async function POST(req: Request) {
// Send email via local sendmail (Postfix/Sendmail/Exim)
await transporter.sendMail({
from: 'William March <contact@williammarch.xyz>',
to: 'your-real-inbox@example.com', // TODO: change to your inbox
to: 'qemuguest@protonmail.com',
replyTo: email,
subject: `New message from ${name} via williammarch.xyz`,
text: `From: ${name} <${email}>\n\n${message}`,

View File

@@ -32,7 +32,10 @@ export async function GET(req: NextRequest) {
}
const md = await res.text();
const html = marked.parse(md || '');
// marked.parse can return string | Promise<string>,
// so we call it in async mode and await the result.
const html = await marked.parse(md || '', { async: true });
return new NextResponse(html, {
status: 200,