security: 端口绑定限制为 127.0.0.1 (API/Web) #135

Merged
xiaoxia merged 1 commits from fix/port-binding into develop 2026-06-30 22:59:48 +08:00
Owner

修复内容

将 API 和 Web 端口绑定从 0.0.0.0 改为 127.0.0.1,防止直接对外暴露。

变更

  • infra/docker/compose.yml:
    • API 端口: ${API_PORT:-8000}:8000127.0.0.1:${API_PORT:-8000}:8000
    • Web 端口: ${WEB_PORT:-3001}:80127.0.0.1:${WEB_PORT:-3001}:80

说明

生产环境应通过 Nginx 反向代理访问,不应直接暴露容器端口。

## 修复内容 将 API 和 Web 端口绑定从 0.0.0.0 改为 127.0.0.1,防止直接对外暴露。 ### 变更 - `infra/docker/compose.yml`: - API 端口: `${API_PORT:-8000}:8000` → `127.0.0.1:${API_PORT:-8000}:8000` - Web 端口: `${WEB_PORT:-3001}:80` → `127.0.0.1:${WEB_PORT:-3001}:80` ### 说明 生产环境应通过 Nginx 反向代理访问,不应直接暴露容器端口。
xiaoxia added 1 commit 2026-06-30 22:59:43 +08:00
security: 端口绑定限制为 127.0.0.1 (API/Web)
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 205h32m24s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 205h32m34s
4b8605c679
xiaoxia merged commit 163aa927cb into develop 2026-06-30 22:59:48 +08:00
Sign in to join this conversation.