Privacy hardening: degoogle, security headers, referrer protection
- Replace Google Fonts with system font stacks across all themes - Add Referrer-Policy, X-Content-Type-Options, X-Frame-Options, CSP headers - Add rel="noreferrer noopener" on all outbound links - Add no-referrer and dns-prefetch-control meta tags to all themes - Clean tracking params on outbound links from trusted/remote sources - Remove Google domains from CSP whitelists Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
23b634d0e0
commit
b86e139bdd
6 changed files with 285 additions and 275 deletions
|
|
@ -123,6 +123,14 @@ class GatewayHandler(BaseHTTPRequestHandler):
|
|||
|
||||
self.send_response(resp["status"])
|
||||
self.send_header("Content-Type", resp.get("content_type", "text/html; charset=utf-8"))
|
||||
self.send_header("Referrer-Policy", "no-referrer")
|
||||
self.send_header("X-Content-Type-Options", "nosniff")
|
||||
self.send_header("X-Frame-Options", "DENY")
|
||||
self.send_header("Content-Security-Policy",
|
||||
"default-src 'self'; "
|
||||
"style-src 'self' 'unsafe-inline'; "
|
||||
"script-src 'self' 'unsafe-inline'; "
|
||||
"img-src 'self' data:")
|
||||
for k, v in resp.get("headers", {}).items():
|
||||
self.send_header(k, v)
|
||||
self.end_headers()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue