From 58fa6d8abaacb62565e0c13bd90562a75121ee0d Mon Sep 17 00:00:00 2001 From: jknapp Date: Fri, 22 Aug 2025 08:36:57 -0700 Subject: [PATCH] Update blocked IP handling to use custom blocked page with 403 status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **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 --- templates/blocked_ip_page.html | 24 +++++++----------------- templates/hap_listener.tpl | 8 +++----- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/templates/blocked_ip_page.html b/templates/blocked_ip_page.html index 4dcae79..b460481 100644 --- a/templates/blocked_ip_page.html +++ b/templates/blocked_ip_page.html @@ -41,21 +41,6 @@ margin-bottom: 15px; font-size: 1.1em; } - .contact { - background: linear-gradient(135deg, #3498db, #2980b9); - color: white; - padding: 12px 24px; - border-radius: 6px; - text-decoration: none; - display: inline-block; - margin-top: 25px; - font-weight: 500; - transition: transform 0.2s ease, box-shadow 0.2s ease; - } - .contact:hover { - transform: translateY(-2px); - box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4); - } .ip-info { background: #f8f9fa; border: 1px solid #e9ecef; @@ -81,7 +66,7 @@ 🚫

Access Denied

Your IP address has been blocked from accessing this website.

-

If you believe this block has been made in error, please contact our support team for assistance.

+

If you believe this block has been made in error, please contact support for assistance.

Error Code: 403 - Forbidden @@ -93,7 +78,12 @@ Domain:
- Contact Support +
+ To request unblocking:
+ • Contact your hosting provider's support team
+ • Provide your IP address and the domain you're trying to access
+ • Explain why you believe this block is in error +