v0.4.0: Cloudflare Pages deploy tooling, items search in URL, spirit bear patch lookup

This commit is contained in:
voson
2026-07-27 16:28:31 +08:00
parent 1d0428b4a3
commit adb8f303c2
13 changed files with 674 additions and 27 deletions
+6
View File
@@ -15,6 +15,7 @@ import json
import mimetypes
import webbrowser
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from urllib.parse import urlparse
import urllib.error
@@ -416,6 +417,11 @@ class Handler(BaseHTTPRequestHandler):
self.send_header("Content-Type", content_type)
self.send_header("Content-Length", str(len(body)))
self.send_header("Cache-Control", "no-store")
self.send_header(
"Content-Security-Policy",
"default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; "
"script-src 'self'; media-src 'self'",
)
self.end_headers()
self.wfile.write(body)