宝塔反代后拦截域名

40次阅读
没有评论

location /api/ {
proxy_pass http://xxxx;
proxy_set_header Host xxxx;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location / {
return 403;
}

此规则实现的是拦截备案域名
只允许/api路径下的通过

正文完
 0
评论(没有评论)