Endpunkt auch unter /kontakt (für Pfad-Routing unter /api), Absender webseite@atilgan-gartenbau.de in .env.example
This commit is contained in:
1 parent
a617846aa9
commit
ae44803629
2 files changed
+9
-8
No files matched your search
+8
-7
@@ -1,18 +1,19 @@
|
|||||||
# Diese Werte in Coolify als Environment-Variablen setzen (NICHT committen).
|
# Diese Werte in Coolify als Environment-Variablen setzen (NICHT committen).
|
||||||
|
|
||||||
# Welche Website darf das Formular abschicken (CORS). Kommagetrennt möglich.
|
# Welche Website darf das Formular abschicken (CORS). Bei same-origin (/api auf
|
||||||
ALLOWED_ORIGIN=https://atilgan-gartenbau.de,https://www.atilgan-gartenbau.de
|
# derselben Domain) unkritisch; zur Sicherheit die Live-Domain eintragen.
|
||||||
|
ALLOWED_ORIGIN=https://atilgan-gartenbau.de
|
||||||
|
|
||||||
# SMTP-Zugang des Postfachs, über das gesendet wird
|
# SMTP-Zugang des Versand-Postfachs
|
||||||
SMTP_HOST=mail.euer-provider.de
|
SMTP_HOST=mail.euer-provider.de
|
||||||
SMTP_PORT=587
|
SMTP_PORT=587
|
||||||
SMTP_SECURE=false # true bei Port 465
|
SMTP_SECURE=false # true bei Port 465
|
||||||
SMTP_USER=info@adnan-atilgan.de
|
SMTP_USER=webseite@atilgan-gartenbau.de
|
||||||
SMTP_PASS=euer-postfach-passwort
|
SMTP_PASS=passwort-des-postfachs
|
||||||
|
|
||||||
# Empfänger & Absender
|
# Empfänger & Absender
|
||||||
MAIL_TO=info@adnan-atilgan.de
|
MAIL_TO=info@adnan-atilgan.de
|
||||||
MAIL_FROM=info@adnan-atilgan.de
|
MAIL_FROM=webseite@atilgan-gartenbau.de
|
||||||
MAIL_SUBJECT_PREFIX=[Webseite]
|
MAIL_SUBJECT_PREFIX=[Webseite]
|
||||||
|
|
||||||
# Port (Coolify setzt den i. d. R. selbst)
|
# Port (Coolify setzt den i. d. R. selbst)
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ app.get('/', (_req, res) => res.json({ ok: true, service: 'kontakt-api' }));
|
|||||||
app.get('/health', (_req, res) => res.json({ ok: true }));
|
app.get('/health', (_req, res) => res.json({ ok: true }));
|
||||||
|
|
||||||
// --- Formular-Endpunkt ---
|
// --- Formular-Endpunkt ---
|
||||||
app.post('/api/kontakt', limiter, async (req, res) => {
|
app.post(['/api/kontakt', '/kontakt'], limiter, async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const b = req.body || {};
|
const b = req.body || {};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user