What's New in v7.9.0
✨ New Features & Enhancements
- Reverse Proxy Support: Added comprehensive support for reverse proxy deployments
- Trusted Proxy Configuration: New
APP_TRUSTED_PROXIESenvironment variable and--trusted-proxiesCLI flag - Correct URL Generation: Properly reads
X-Forwarded-HostandX-Forwarded-Protoheaders from trusted proxies - Fixes QR Code URLs: Resolves issue where QR code URLs showed internal container hostnames instead of public domains
- Flexible Configuration: Supports specific IP ranges/CIDRs or trust all proxies with
0.0.0.0/0
- Trusted Proxy Configuration: New
- Auto-Download Media Control: New configuration option to control automatic media downloads
- Configurable Behavior:
--auto-download-mediaflag andWHATSAPP_AUTO_DOWNLOAD_MEDIAenvironment variable - Defaults to Enabled: Auto-download is enabled by default, maintaining backward compatibility
- Media Type Coverage: Affects audio, documents, images, stickers, and video messages
- Configurable Behavior:
- Enhanced Webhook Payload: Message editing webhook now includes
original_message_id- Better Tracking: Easier to track which message was modified in your database
- Database Update Support: Simplifies updating records when messages are edited
🐛 Bug Fixes & Improvements
- Database Cleanup Fix: Fixed "file is being used by another process" error during logout
- Proper Connection Closure: Database connections are now properly closed before file deletion
- Both Databases Handled: Closes both main database and keys database connections
- Cross-Platform Support: Resolves file locking issues on Windows and other platforms
- WhatsApp Client Assignment: Fixed WhatsApp client initialization
- Correct Assignment: Properly assigns the client returned by
InitWaCLItowhatsappCli - Prevents Nil References: Ensures the client is correctly initialized for all operations
- Correct Assignment: Properly assigns the client returned by
- Timezone Configuration: Added proper timezone handling and configuration
🎯 What This Means for You
For Reverse Proxy Users (Caddy, nginx, Kong, Traefik, etc.)
- Correct Public URLs: API responses now return your public domain URLs instead of internal container names
- Easy Configuration: Simply set
APP_TRUSTED_PROXIES=0.0.0.0/0in your environment or use the CLI flag - Secure Deployment: Specify exact IP ranges for enhanced security in production
For All Users
- Reliable Logout: No more "file in use" errors when logging out
- Better Media Control: Choose whether to automatically download media or download on-demand
- Enhanced Webhooks: Track message edits more easily with the original message ID
- Improved Stability: Multiple bug fixes for more reliable operation
Important Notes
✅ Reverse Proxy Configuration
- Set
APP_TRUSTED_PROXIESto enable proxy header support - For development:
APP_TRUSTED_PROXIES=0.0.0.0/0(trust all) - For production: Specify your proxy IP ranges like
APP_TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12 - Can also use CLI flag:
./whatsapp rest --trusted-proxies="0.0.0.0/0"
✅ Media Download Configuration
- Default behavior unchanged: media is auto-downloaded
- To disable: Set
WHATSAPP_AUTO_DOWNLOAD_MEDIA=falseor use--auto-download-media=false - Affects: audio, documents, images, stickers, videos from incoming messages
✅ Breaking Changes
- None - all changes are backward compatible
- Existing deployments will continue to work without configuration changes
🔧 Recommended Actions
- If deploying behind a reverse proxy, configure
APP_TRUSTED_PROXIESfor correct URL generation - Update your
.envfile based on the updated.env.example - If experiencing high storage usage, consider disabling auto-download media
Configuration Examples
Using Environment Variables:
APP_TRUSTED_PROXIES=0.0.0.0/0
WHATSAPP_AUTO_DOWNLOAD_MEDIA=trueUsing CLI Flags:
./whatsapp rest --trusted-proxies="0.0.0.0/0" --auto-download-media=falseDocker Compose:
environment:
- APP_TRUSTED_PROXIES=0.0.0.0/0
- WHATSAPP_AUTO_DOWNLOAD_MEDIA=trueSummary
Version 7.9.0 is a feature-rich release that adds critical reverse proxy support, giving users full control over media downloads, and fixing important bugs related to database cleanup and client initialization. The new trusted proxy configuration resolves URL generation issues for users deploying behind reverse proxies like Caddy, nginx, or Kong. The auto-download media feature provides flexibility for managing storage and bandwidth usage. Combined with bug fixes for logout operations and client initialization, this release improves both functionality and reliability for all deployment scenarios.
What's Changed
- Fix: assign the client returned by InitWaCLI to whatsappCli. (#467) by @moz4rtdev in #468
- Fix logout bug by closing database connections before file deletion (#464) by @aldinokemal in #469
- feat: add auto-download media feature and configuration options
- feat: add trusted proxy configuration support for reverse proxy deployments
- feat: enhance message editing webhook payload with original_message_id
- feat: add timezone configuration and handling
New Contributors
- @moz4rtdev made their first contribution in #468
Full Changelog: v7.8.2...v7.9.0