fix: nginx 精确拦截 /api/auth/register(私有化禁用用户自注册)

这个提交包含在:
xuqinmin12 2026-06-12 19:50:49 +08:00
父节点 f04d1cea8c
当前提交 896ddab194

查看文件

@ -90,6 +90,12 @@ server {
proxy_send_timeout 600s; 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/ 之后) # 核心 API兜底,在所有具体 /api/xxx/ 之后)
location /api/ { location /api/ {
set $svc tenant-service; set $svc tenant-service;