Files
haproxy-manager-base/templates/blocked_ip_page.html
jknapp ca37a68255
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 1m1s
Add IP blocking functionality to HAProxy Manager
- 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>
2025-08-21 18:32:47 -07:00

116 lines
3.8 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;
}
.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;
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 our support team 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>
<a href="mailto:support@example.com" class="contact">Contact Support</a>
</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>