security: 端口绑定限制为 127.0.0.1 (API/Web) #135
Reference in New Issue
Block a user
Delete Branch "fix/port-binding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
修复内容
将 API 和 Web 端口绑定从 0.0.0.0 改为 127.0.0.1,防止直接对外暴露。
变更
infra/docker/compose.yml:${API_PORT:-8000}:8000→127.0.0.1:${API_PORT:-8000}:8000${WEB_PORT:-3001}:80→127.0.0.1:${WEB_PORT:-3001}:80说明
生产环境应通过 Nginx 反向代理访问,不应直接暴露容器端口。