mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 01:47:52 +08:00
polished items from the re-audit report by Claude, add Ubuntu live ISO method to README
This commit is contained in:
4
Makefile
4
Makefile
@@ -96,8 +96,8 @@ build-tails:
|
||||
@echo "🔨 Building for TailsOS (relative paths + embedded CSP)..."
|
||||
VITE_BASE_PATH="./" bun run vite build
|
||||
@echo ""
|
||||
@echo "🔒 Injecting production CSP into index.html..."
|
||||
@perl -i.bak -pe 's|(<head>)|$$1\n<meta http-equiv="Content-Security-Policy" content="default-src '"'"'self'"'"'; script-src '"'"'self'"'"' '"'"'unsafe-inline'"'"' '"'"'wasm-unsafe-eval'"'"'; style-src '"'"'self'"'"' '"'"'unsafe-inline'"'"'; img-src '"'"'self'"'"' data: blob:; connect-src '"'"'self'"'"' blob: data:; font-src '"'"'self'"'"'; object-src '"'"'none'"'"'; media-src '"'"'self'"'"' blob:; base-uri '"'"'self'"'"'; form-action '"'"'none'"'"';" data-env="tails">|' dist/index.html
|
||||
@echo "🔒 Injecting production CSP into index.html (replacing baseline CSP)..."
|
||||
@perl -i.bak -0777 -pe 's|<meta\s+http-equiv="Content-Security-Policy"[^>]*/>|<meta http-equiv="Content-Security-Policy" content="default-src '"'"'self'"'"'; script-src '"'"'self'"'"' '"'"'unsafe-inline'"'"' '"'"'wasm-unsafe-eval'"'"'; style-src '"'"'self'"'"' '"'"'unsafe-inline'"'"'; img-src '"'"'self'"'"' data: blob:; connect-src '"'"'self'"'"' blob: data:; font-src '"'"'self'"'"'; object-src '"'"'none'"'"'; media-src '"'"'self'"'"' blob:; base-uri '"'"'self'"'"'; form-action '"'"'none'"'"';" data-env="tails">|' dist/index.html
|
||||
@rm -f dist/index.html.bak
|
||||
@echo "✅ CSP embedded in dist/index.html"
|
||||
@echo ""
|
||||
|
||||
Reference in New Issue
Block a user