**Problems Fixed:**
- Remove invalid 'http-request set-status' directive (not supported in HAProxy 3.0.11)
- Replace with proper blocked backend using 'http-request return'
- Add blocked backend template for serving blocked page with 403 status
**Changes Made:**
- Create hap_blocked_backend.tpl template for blocked IPs
- Update hap_listener.tpl to use blocked-backend instead of invalid status setting
- Modify haproxy_manager.py to include blocked backend in config generation
- Add blocked_ip_page.html copying to HAProxy directory during config generation
**Technical Details:**
- HAProxy 3.0.11 doesn't support 'http-request set-status' directive
- Use 'http-request return status 403 content-type text/html file' instead
- Blocked IPs now get proper 403 status with custom HTML page
- Configuration validation should now pass without errors
**Testing:**
- HAProxy configuration validation should succeed
- Blocked IPs should see custom page with 403 status
- All existing functionality maintained
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Template Changes:**
- Switch from direct denial to blocked page redirect with 403 status
- Blocked IPs now see /blocked-ip page instead of generic 403 denial
- Maintains proper 403 HTTP status code for blocked requests
**Blocked Page Updates:**
- Remove contact support button to prevent misuse
- Add clear instructions on how to request unblocking
- Provide structured guidance for contacting hosting provider
- Maintain professional appearance with helpful information
**Benefits:**
- Better user experience for legitimate blocks
- Clear instructions prevent support confusion
- Maintains security while being informative
- Professional appearance reflects well on hosting providers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add blocked_ips database table to store blocked IP addresses
- Implement API endpoints for IP blocking management:
- GET /api/blocked-ips: List all blocked IPs
- POST /api/blocked-ips: Block an IP address
- DELETE /api/blocked-ips: Unblock an IP address
- Update HAProxy configuration generation to include blocked IP ACLs
- Create blocked IP page template for denied access
- Add comprehensive API documentation for WHP integration
- Include test script for IP blocking functionality
- Update .gitignore with Python patterns
- Add CLAUDE.md for codebase documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace http-response set-body (HAProxy 2.8+) with local server approach
- Add separate Flask server on port 8080 to serve default page
- Update default backend template to use local server instead of inline HTML
- Maintain all customization features via environment variables
- Fix JavaScript error handling for domains API response