Skip to content

Commit

Permalink
fix(security): nginx.conf 增加安全策略
Browse files Browse the repository at this point in the history
  • Loading branch information
lltx committed Dec 14, 2024
1 parent 3aea300 commit a261ab7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/pig-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ server {
proxy_set_header Host $http_host;
proxy_set_header from "";
}

# 屏蔽所有敏感路径,不用改代码
location ~* ^/(actuator|swagger-ui|v3/api-docs|swagger-resources|webjars|doc.html) {
return 403; # 禁止访问
}
}

0 comments on commit a261ab7

Please sign in to comment.