verify erstellen
This commit is contained in:
parent
32ef5aa3b1
commit
0b0ef6e6ed
6
app.js
6
app.js
@ -16,7 +16,11 @@ const PORT = process.env.PORT || 3000;
|
|||||||
Security Middleware
|
Security Middleware
|
||||||
======================== */
|
======================== */
|
||||||
|
|
||||||
app.use(helmet());
|
app.use(
|
||||||
|
helmet({
|
||||||
|
contentSecurityPolicy: false,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
const limiter = rateLimit({
|
const limiter = rateLimit({
|
||||||
windowMs: 15 * 60 * 1000,
|
windowMs: 15 * 60 * 1000,
|
||||||
|
|||||||
@ -19,7 +19,25 @@ router.get("/:token", async (req, res) => {
|
|||||||
[user[0].id],
|
[user[0].id],
|
||||||
);
|
);
|
||||||
|
|
||||||
res.send("Account erfolgreich aktiviert.");
|
res.send(`
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Account aktiviert</title>
|
||||||
|
|
||||||
|
<meta http-equiv="refresh" content="2;url=/" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h2>Account erfolgreich aktiviert</h2>
|
||||||
|
<p>Du wirst zum Login weitergeleitet...</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
const nodemailer = require("nodemailer");
|
const nodemailer = require("nodemailer");
|
||||||
|
|
||||||
const transporter = nodemailer.createTransport({
|
const transporter = nodemailer.createTransport({
|
||||||
host: "mail.dynastyofknights.com",
|
host: "smtp.ionos.de",
|
||||||
port: 587,
|
port: 587,
|
||||||
secure: false,
|
secure: false,
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user