From f05f8003295d361973793d0a73f9a093f8dee738 Mon Sep 17 00:00:00 2001 From: MemRelay Date: Wed, 11 Nov 2026 02:50:22 +0800 Subject: [PATCH] =?UTF-8?q?create:=20=E7=94=9F=E4=BA=A7=E6=98=AF=20HTTP=20?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=EF=BC=8C=E5=89=8D=E7=AB=AF=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=AE=89=E5=85=A8=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MemRelay-Operation: memory-save:exp-http-secure-context-apis-20261111 MemRelay-Resource: eee5dad5-8523-4e3b-a76b-067d1cc7e16f --- ... HTTP 访问,前端不能依赖安全上下文 API.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/d5a7f581-c442-4554-87b9-ee723b8b0258/生产是 HTTP 访问,前端不能依赖安全上下文 API.md diff --git a/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/生产是 HTTP 访问,前端不能依赖安全上下文 API.md b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/生产是 HTTP 访问,前端不能依赖安全上下文 API.md new file mode 100644 index 0000000..d372a83 --- /dev/null +++ b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/生产是 HTTP 访问,前端不能依赖安全上下文 API.md @@ -0,0 +1,20 @@ +--- +title: 生产是 HTTP 访问,前端不能依赖安全上下文 API +type: experience +permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/生产是-http-访问前端不能依赖安全上下文-api +stable_id: eee5dad5-8523-4e3b-a76b-067d1cc7e16f +scope: project +memory_type: experience +project_id: d5a7f581-c442-4554-87b9-ee723b8b0258 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 1 +request_id: exp-http-secure-context-apis-20261111 +created_at: '2026-11-10T18:50:16.449100+00:00' +updated_at: '2026-11-10T18:50:16.449100+00:00' +tags: +- frontend +- http +--- + +生产 Metrix 通过 http://188.5.127.115:18271 访问,不是安全上下文。crypto.randomUUID、navigator.clipboard、crypto.subtle 等只在 HTTPS 或 localhost 可用,本地开发不会暴露问题。前端要么不用这些 API(列表 key 用自增编号),要么像 utils/clipboard.ts 那样先判断 window.isSecureContext 再兜底。 \ No newline at end of file