Add the HTTP hardening the policy requires before 1.0 (closes #108)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Every answer carries the six security headers REPO_POLICIES.md lists. The Content-Security-Policy allows inline content only with a nonce made for that answer; the pages put it on their style and script blocks and drop their four style attributes. The request log and /ip/ take a forwarded address only from a proxy listed in TRUSTED_PROXIES, which stops the start when set but invalid: the last X-Forwarded-For entry that is not a trusted proxy. X-Real-IP and True-Client-IP are no longer read. The JSON routes and the health check send fixed messages in place of database, parser and resolver errors, and log the detail. Model: opus-5-5
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>RouteWatch Status</title>
|
||||
<style>
|
||||
<style nonce="{{.CSPNonce}}">
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -130,6 +130,7 @@
|
||||
color: #ef4444;
|
||||
}
|
||||
.error {
|
||||
display: none;
|
||||
background: #fee;
|
||||
color: #c00;
|
||||
padding: 10px;
|
||||
@@ -173,7 +174,7 @@
|
||||
</nav>
|
||||
|
||||
<main class="main-content">
|
||||
<div id="error" class="error" style="display: none;"></div>
|
||||
<div id="error" class="error"></div>
|
||||
<div class="status-grid">
|
||||
<div class="status-card">
|
||||
<h2>RouteWatch</h2>
|
||||
@@ -383,8 +384,8 @@
|
||||
<div id="handler-stats-container" class="status-grid">
|
||||
<!-- Handler stats will be dynamically added here -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<script nonce="{{.CSPNonce}}">
|
||||
function formatBytes(bytes) {
|
||||
if (bytes === 0) return '0 B';
|
||||
const k = 1024;
|
||||
|
||||
Reference in New Issue
Block a user