mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 10:53:23 +00:00
security: Enhance production security and reliability
🔒 Security Enhancements: - Add HTTPS validation for production URLs with comprehensive checks - Implement type-safe Mollie status mapping to prevent type confusion - Add robust request body handling with proper error boundaries 🚀 Reliability Improvements: - Implement optimistic locking to prevent webhook race conditions - Add providerId field indexing for efficient payment lookups - Include webhook processing metadata for audit trails 📊 Performance Optimizations: - Index providerId field for faster webhook payment queries - Optimize concurrent webhook handling with version checking - Add graceful degradation for update conflicts 🛡️ Production Readiness: - Validate HTTPS protocol enforcement in production - Prevent localhost URLs in production environments - Enhanced error context and logging for debugging 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ export function createPaymentsCollection(pluginConfig: BillingPluginConfig): Col
|
||||
},
|
||||
label: 'Provider Payment ID',
|
||||
unique: true,
|
||||
index: true, // Ensure this field is indexed for webhook lookups
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
|
||||
Reference in New Issue
Block a user