feat: 遮蔽后台静态产物中的 Taro 指纹
Traefik 把 wechat.app.que01.top 上除 /api、/media 以外的路径直接转发到 Admin 静态 服务器且没有鉴权,因此 /admin/assets/*.js 可以被任意下载。后台产物里的模板 renderer glob 路径(packages/template-*/taro/index.tsx)与按钮尺寸令牌(--taro-button-height) 同样暴露技术栈,此前只遮蔽了 Taro 双端产物。 - mask-taro.cjs 增加 admin 目标,覆盖 apps/admin/dist,接入根脚本 build:admin:preview; - deploy:package 在后台构建后校验 apps/admin/dist,命中指纹即中止打包; - 补充遮蔽目标测试与文档(ADR 0025、README、部署说明、交付清单)。 验证:后台产物遮蔽后 glob key 与运行时查找同步改名;未遮蔽/已遮蔽产物用生产静态 服务器跑同一套后台浏览器测试,失败内容逐字节一致(既有失败与本改动无关);H5 预览 11 项浏览器回归全部通过;admin 构建、lint、typecheck、deploy 与 API 测试通过。
This commit is contained in:
1 parent
9ad2776515
commit
4d1cd8f365
8 files changed
+63
-8
No files matched your search
+1
-1
@@ -34,7 +34,7 @@
|
||||
"deploy:images": "node scripts/deploy/export-images.mjs",
|
||||
"test:deploy-verify": "node --test scripts/deploy/verify-release.test.mjs",
|
||||
"test:deploy": "node --test scripts/deploy/*.test.mjs deploy/*.test.mjs",
|
||||
"build:admin:preview": "PREVIEW_ALL_TEMPLATES=true API_BASE_URL=/api PREVIEW_PUBLIC_PATH=/template-preview/ pnpm --filter @personal-brand/taro build:preview && node scripts/package-template-preview.cjs && VITE_APP_BASE_PATH=/admin/ VITE_API_BASE_URL=/api pnpm --filter @personal-brand/admin build",
|
||||
"build:admin:preview": "PREVIEW_ALL_TEMPLATES=true API_BASE_URL=/api PREVIEW_PUBLIC_PATH=/template-preview/ pnpm --filter @personal-brand/taro build:preview && node scripts/package-template-preview.cjs && VITE_APP_BASE_PATH=/admin/ VITE_API_BASE_URL=/api pnpm --filter @personal-brand/admin build && node apps/taro/config/mask-taro.cjs admin",
|
||||
"build:taro:food": "pnpm --filter @personal-brand/taro build:h5 && pnpm --filter @personal-brand/taro build:weapp",
|
||||
"build:taro:linjing": "TEMPLATE_KEY=linjing-editorial pnpm --filter @personal-brand/taro build:h5 && TEMPLATE_KEY=linjing-editorial pnpm --filter @personal-brand/taro build:weapp",
|
||||
"template:doctor": "node scripts/template-doctor.mjs",
|
||||
|
||||
Reference in new issue
Block a user