Releases: hanoak/contentstack-webhook-verify
Releases · hanoak/contentstack-webhook-verify
v1.0.1
Release Notes v1.0.1
🌏 New Regional Support
AWS Australia Region Added
- Expanded global coverage: Added support for AWS Australia (AU) region
- Better performance: Users in Australia can now use their regional Contentstack instance for faster webhook verification
- Seamless integration: No breaking changes - simply specify
region: "AU"in your configuration options
📝 Changes
Regional Configuration Updates
- Added
AUregion support to theRegionKeytype - Updated region mapping to include Australia's public key endpoint
- Enhanced regional flexibility for global Contentstack deployments
🎯 What This Means for Users
For Australia Users
- Reduced latency: Webhook verification now uses Australia-based endpoints when configured
- Improved reliability: Regional proximity reduces network-related verification failures
- Better compliance: Data processing stays within regional boundaries when required
For Global Applications
- More deployment options: Support for additional Contentstack regional deployments
- Flexible configuration: Easy switching between regions based on your Contentstack setup
🔄 Usage
New Australia Region Configuration
import verify from 'contentstack-webhook-verify';
const config = {
region: 'AU' // New: Australia region support
};
await verify(signature, requestBody, config);Updated Region Options
type RegionKey = "NA" | "EU" | "AU" | "AZZURE-NA" | "AZZURE-EU" | "GCP-NA" | "GCP-EU";
// ^^^^^ New region added📦 Migration Guide
From v1.0.1 to v1.0.2
- No code changes required for existing users
- Optional enhancement: Australian users can now specify
region: "AU"for optimal performance - Backward compatible: All existing region configurations continue to work unchanged
🌐 Supported Regions
| Region Code | Description | Endpoint |
|---|---|---|
NA |
AWS North America | https://app.contentstack.com |
EU |
AWS Europe | https://eu-app.contentstack.com |
AU |
AWS Australia (New) | https://au-app.contentstack.com |
AZZURE-NA |
Azure North America | https://azure-na-app.contentstack.com |
AZZURE-EU |
Azure Europe | https://azure-eu-app.contentstack.com |
GCP-NA |
Google Cloud North America | https://gcp-na-app.contentstack.com |
GCP-EU |
Google Cloud Europe | https://gcp-eu-app.contentstack.com |
📦 Installation
# Update to latest version
npm install contentstack-webhook-verify@latest
# Or install specific version
npm install contentstack-webhook-verify@1.0.2🔍 Example: Australia Region Setup
import express from 'express';
import verify from 'contentstack-webhook-verify';
const app = express();
app.use(express.json());
app.post('/webhook', async (req, res) => {
try {
const signature = req.headers['x-contentstack-request-signature'];
// Use Australia region for optimal APAC performance
await verify(signature, req.body, { region: 'AU' });
console.log('Webhook verified successfully from AU region!');
res.status(200).send('Success');
} catch (error) {
res.status(401).send('Unauthorized');
}
});🛠 Technical Details
- Version: 1.0.2
- Type: Minor enhancement (backward compatible)
- Changes: Added AU region support
- Dependencies: No changes
- API: Extended region options, no breaking changes
🚀 What's Next
This regional expansion demonstrates our commitment to global accessibility. We continue to monitor Contentstack's regional offerings and will add support for new regions as they become available.
Full Changelog: v1.0.1...v1.0.2
Issues & Feedback: GitHub Issues
Regional Support: For questions about regional configurations, please refer to our documentation
v1.0.0 - Initial Stable Release
GitHub Release Summary - v1.0.0
🎉 contentstack-webhook-verify v1.0.0 - Initial Release
A secure Node.js library for verifying Contentstack webhook authenticity
🚀 Key Features
- ✅ Cryptographic Signature Verification using Contentstack's public keys
- ✅ Replay Attack Prevention with configurable time windows
- ✅ Multi-Region Support (NA, EU, AZZURE-NA, AZZURE-EU, GCP-NA, GCP-EU)
- ✅ Full TypeScript Support with comprehensive type definitions
- ✅ Zero Dependencies for minimal footprint
- ✅ Modern ES Module architecture
🔒 Security First
- Validates webhook signatures against Contentstack's public keys
- Prevents replay attacks with timestamp validation
- Comprehensive input validation and error handling
- Production-ready security measures
🛠️ Developer Experience
- TypeScript with strict type checking
- Framework Agnostic - works with Express.js, Next.js, AWS Lambda
- Comprehensive Documentation with real-world examples
- Professional Build Pipeline with ESLint, Prettier, Husky
📦 Installation
npm install contentstack-webhook-verify⚡ Quick Start
import verify from 'contentstack-webhook-verify';
app.post('/webhook', async (req, res) => {
try {
await verify(req.headers['x-contentstack-request-signature'], req.body);
res.status(200).send('✅ Verified');
} catch (error) {
res.status(401).send('❌ Unauthorized');
}
});📚 Documentation
- Complete README - Installation, usage, examples
- API Reference - Full API documentation
- Contributing Guide - Development setup
🌍 Multi-Framework Support
- Express.js - Middleware integration
- Next.js - API route examples
- AWS Lambda - Serverless compatibility
- Any Node.js framework - Framework agnostic design
🎯 Perfect For
- Content management systems
- Webhook-driven workflows
- Real-time content synchronization
- Enterprise security compliance
- Serverless webhook processors
Ready to secure your Contentstack webhooks? Get started now! 🚀
npm install contentstack-webhook-verify