feat: security audit, rate limiting, server-side pricing, html escaping and security headers

This commit is contained in:
MichalC
2026-08-01 13:24:41 +02:00
parent f07f2c2407
commit 47a9ac07fb
24 changed files with 292 additions and 151 deletions
+17
View File
@@ -0,0 +1,17 @@
import { Resend } from 'resend';
export function getMailClient() {
const apiKey = process.env.RESEND_API_KEY;
const fromEmail = process.env.RESEND_FROM_EMAIL;
const toEmail = process.env.RESEND_TO_EMAIL;
if (!apiKey || !fromEmail || !toEmail) {
return null;
}
return {
resend: new Resend(apiKey),
fromEmail,
toEmail,
};
}