From 896ddab1944976a22d9129b390e1d80dbd264fab Mon Sep 17 00:00:00 2001 From: xuqinmin12 Date: Fri, 12 Jun 2026 19:50:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20nginx=20=E7=B2=BE=E7=A1=AE=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=20/api/auth/register=EF=BC=88=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E5=8C=96=E7=A6=81=E7=94=A8=E7=94=A8=E6=88=B7=E8=87=AA=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/nginx/conf.d/xuqm.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/nginx/conf.d/xuqm.conf b/config/nginx/conf.d/xuqm.conf index 65cf4cf..b9f835c 100644 --- a/config/nginx/conf.d/xuqm.conf +++ b/config/nginx/conf.d/xuqm.conf @@ -90,6 +90,12 @@ server { proxy_send_timeout 600s; } + # 私有化部署:精确拦截用户自注册(必须在通用 /api/ 之前) + location = /api/auth/register { + add_header Content-Type 'application/json; charset=utf-8' always; + return 403 '{"code":403,"status":"1","data":null,"message":"私有化部署已禁用用户自注册"}'; + } + # 核心 API(兜底,在所有具体 /api/xxx/ 之后) location /api/ { set $svc tenant-service;