Contactmodule: token- en inzendroute met spamafhandeling, idempotentie en retentietaak
Nieuwe module SlpModularCms.Modules.Contact met eigen DbContext en migratie InitialCreate. GET contact-messages/token en POST contact-messages zijn publiek ([PublicSiteEndpoint]), geven bij echte inzendingen, spam en herhalingen hetzelfde 202 en slaan spam apart op (30 dagen, dagplafond). Standaard staat de module uit (Contact:Enabled=false, 404 met lege body, geen databasetoegang) totdat de rate limiting per client op de basisbranch staat; de rate-limit-sleutel zit in een enkele functie zodat dat later een regel wijzigen is. Mail zit achter een seam (nog een no-op). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,22 @@
|
||||
"Cors": {
|
||||
"AllowedOrigins": []
|
||||
},
|
||||
"Contact": {
|
||||
// OFF by default. Do not enable on a public host until per-client rate limiting is on the
|
||||
// base branch (see ContactRateLimitPartition): until then the contact rate limits are one
|
||||
// bucket shared by all visitors.
|
||||
"Enabled": false,
|
||||
"SiteId": "slpsoftware",
|
||||
"MinSeconds": 3,
|
||||
"TokenLifetimeMinutes": 120,
|
||||
"RetentionMonths": 12,
|
||||
"SpamRetentionDays": 30,
|
||||
"MaxSpamRowsPerDay": 200,
|
||||
"MaxBodyBytes": 16384,
|
||||
"Captcha": {
|
||||
"Enabled": false
|
||||
}
|
||||
},
|
||||
"RateLimiting": {
|
||||
"Login": {
|
||||
"PermitLimit": 5,
|
||||
@@ -77,6 +93,14 @@
|
||||
"OfferingsPublic": {
|
||||
"PermitLimit": 120,
|
||||
"WindowSeconds": 60
|
||||
},
|
||||
"ContactForm": {
|
||||
"PermitLimit": 5,
|
||||
"WindowSeconds": 600
|
||||
},
|
||||
"ContactToken": {
|
||||
"PermitLimit": 20,
|
||||
"WindowSeconds": 600
|
||||
}
|
||||
},
|
||||
"SecurityHeaders": {
|
||||
|
||||
Reference in New Issue
Block a user