update: 登录 clientIp 可配置,默认 0.0.0.0

MemRelay-Operation: memory-save:punchlog-decision-clientip-config-20261109
MemRelay-Resource: bd4f8dfe-b263-474e-b874-cd9418a2e843
This commit is contained in:
2026-11-09 10:21:08 +08:00
parent 0054c6b075
commit b403f176c1
2 changed files with 17 additions and 20 deletions
@@ -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。
@@ -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。