Files
haproxy-manager-base/templates/blocked_ip_page.html
jknapp 58fa6d8aba
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 1m17s
Update blocked IP handling to use custom blocked page with 403 status
**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>
2025-08-22 08:36:57 -07:00

106 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Access Denied</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
text-align: center;
padding: 50px 20px;
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
margin: 0;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.container {
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
max-width: 600px;
width: 100%;
}
.icon {
font-size: 64px;
margin-bottom: 20px;
display: block;
}
h1 {
color: #e74c3c;
margin-bottom: 20px;
font-size: 2.2em;
font-weight: 600;
}
p {
color: #555;
line-height: 1.7;
margin-bottom: 15px;
font-size: 1.1em;
}
.ip-info {
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 6px;
padding: 15px;
margin: 20px 0;
font-family: 'Courier New', monospace;
color: #495057;
}
.error-code {
background: #ffebee;
border: 1px solid #ffcdd2;
border-radius: 6px;
padding: 10px;
margin: 20px 0;
color: #c62828;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<span class="icon">🚫</span>
<h1>Access Denied</h1>
<p>Your IP address has been blocked from accessing this website.</p>
<p>If you believe this block has been made in error, please contact support for assistance.</p>
<div class="error-code">
Error Code: 403 - Forbidden
</div>
<div class="ip-info">
<strong>Your IP:</strong> <span id="client-ip"></span><br>
<strong>Time:</strong> <span id="timestamp"></span><br>
<strong>Domain:</strong> <span id="domain"></span>
</div>
<div style="background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 20px; margin-top: 25px; color: #495057; text-align: left;">
<strong>To request unblocking:</strong><br>
• Contact your hosting provider's support team<br>
• Provide your IP address and the domain you're trying to access<br>
• Explain why you believe this block is in error
</div>
</div>
<script>
// Display the current domain and timestamp
document.getElementById('domain').textContent = window.location.hostname;
document.getElementById('timestamp').textContent = new Date().toLocaleString();
// Attempt to get client IP (this will show the proxy IP in most cases)
// For actual client IP, this would need to be injected by the server
document.getElementById('client-ip').textContent = 'Hidden for privacy';
// You could also make an AJAX call to get the real client IP if needed
// fetch('/api/my-ip').then(r => r.json()).then(data => {
// document.getElementById('client-ip').textContent = data.ip;
// }).catch(() => {
// document.getElementById('client-ip').textContent = 'Unable to determine';
// });
</script>
</body>
</html>