diff --git a/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 可配置,默认 0.0.0.0.md b/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 可配置,默认 0.0.0.0.md new file mode 100644 index 0000000..4dd3799 --- /dev/null +++ b/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 可配置,默认 0.0.0.0.md @@ -0,0 +1,17 @@ +--- +title: 登录 clientIp 可配置,默认 0.0.0.0 +type: decision +permalink: main/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录-client-ip-可配置默认-0.0.0.0 +stable_id: bd4f8dfe-b263-474e-b874-cd9418a2e843 +scope: project +memory_type: decision +project_id: a84c6646-289e-46f8-b0f9-41317c651955 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 2 +request_id: punchlog-decision-clientip-config-20261109 +created_at: '2026-11-09T02:20:10.964453+00:00' +updated_at: '2026-11-09T02:21:03.122420+00:00' +--- + +登录 clientIp 保留配置项 ICENTER_CLIENT_IP,默认 0.0.0.0。优先读环境变量,其次读 .env,都没有则用 0.0.0.0。代码在 src/punchlog/auth.py。 \ No newline at end of file diff --git a/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 固定使用 0.0.0.0.md b/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 固定使用 0.0.0.0.md deleted file mode 100644 index 14b5f64..0000000 --- a/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录 clientIp 固定使用 0.0.0.0.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: 登录 clientIp 固定使用 0.0.0.0 -type: decision -permalink: main/projects/a84c6646-289e-46f8-b0f9-41317c651955/登录-client-ip-固定使用-0.0.0.0 -stable_id: bd4f8dfe-b263-474e-b874-cd9418a2e843 -scope: project -memory_type: decision -project_id: a84c6646-289e-46f8-b0f9-41317c651955 -usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 -status: active -revision: 1 -request_id: punchlog-decision-clientip-zero-20261109 -created_at: '2026-11-09T02:20:10.964453+00:00' -updated_at: '2026-11-09T02:20:10.964453+00:00' -tags: -- login -- clientIp ---- - -2026-11-09 已实测:登录报文 clientIp 固定填 0.0.0.0 可以登录成功。不再从环境变量或 .env 模拟 IP。代码在 src/punchlog/auth.py 的 DEFAULT_DEVICE.clientIp。 \ No newline at end of file