• v0.1.1 05d7060670

    ric released this 2025-12-04 19:37:37 +00:00 | 1 commits to main since this release

    What's New in v0.1.1

    This release adds two major security and functionality features to Bovine Pages Server.

    DNS TXT Record Verification for Custom Domains

    A new optional security feature to prevent domain hijacking:

    • Ownership Verification: Requires DNS TXT record to prove domain ownership before registering custom domains
    • Security: SHA256 hash with constant-time comparison prevents timing attacks
    • Format: bovine-pages-verification=<SHA256_HASH> where hash = SHA256(owner/repository)
    • Configuration: Enable with enableCustomDomainDNSVerification: true (disabled by default)
    • Backward Compatible: Existing domains continue working when disabled
    • Helper Script: examples/generate-dns-verification-hash.sh for generating hashes
    • Comprehensive Tests: Full test coverage for hash generation and DNS verification

    Custom Domain Redirects

    A powerful URL redirect system for custom domains:

    • Simple Configuration: .redirects file in repository root with FROM:TO format
    • Easy Activation: Visit /LOAD_REDIRECTS endpoint to activate redirects
    • Traefik Integration: Automatically creates Traefik redirectregex middleware
    • Persistent Storage: Stores middleware configuration in Redis
    • Security: Configurable maxRedirects parameter (default: 25) prevents resource exhaustion
    • Flexible Format: Supports comments (#) and empty lines
    • Safe Regex: Automatic escaping of special characters
    • Permanent Redirects: 301 status for all redirects
    • Custom Domains Only: Works only on custom domains, not pages domain URLs
    • Redis Required: Requires Redis cache for middleware storage
    • User-Friendly: Beautiful HTML success/error pages with detailed instructions
    • Well Tested: >90% test coverage for redirects module

    Example: DNS Verification Setup

    # 1. Generate verification hash
    ./examples/generate-dns-verification-hash.sh squarecows bovine-website
    # Output: 73bb8214899661e7f7900c77714586cc51702e6cf26a58c62e17fa9d88f3d3d3
    
    # 2. Add DNS TXT record
    TXT bovine.squarecows.com bovine-pages-verification=73bb8214899661e7f7900c77714586cc51702e6cf26a58c62e17fa9d88f3d3d3
    
    # 3. Add to .pages file
    enabled: true
    custom_domain: bovine.squarecows.com
    
    # 4. Visit pages URL to register
    https://squarecows.pages.example.com/bovine-website
    

    Example: Custom Domain Redirects Setup

    # .redirects file in repository root
    # Redirect old blog to new location
    /old-blog:/blog
    /about-us:/about
    
    # Visit to activate
    https://yourdomain.com/LOAD_REDIRECTS
    

    Breaking Changes

    None - both features are opt-in and backward compatible.

    Configuration

    DNS Verification (optional):

    enableCustomDomainDNSVerification: true  # default: false
    

    Redirects (optional):

    maxRedirects: 25  # default: 25, max redirects per domain
    

    Full Changelog

    See CHANGELOG.md for complete details.


    🤖 Generated with Claude Code

    Downloads