Nginx配置禁止远程访问swagger、xrebel、druid
Nginx配置禁止远程访问swagger
server {
# 禁止远程访问swagger,xrebel等
location ~ /api-docs {
return 403 FORBIDDEN!;
}
location ~ /swagger-ui.html {
return 403 FORBIDDEN!;
}
location ~ /rebel {
return 403 FORBIDDEN!;
}
location ~ /druid/ {
return 403 FORBIDDEN!;
}
}

附:Nginx通配符
=:精确匹配
^~:前缀匹配
~ 和 ~*:正则匹配
本文来自博客园,作者:Huathy,遵循 CC 4.0 BY-NC-SA 版权协议。转载请注明原文链接:https://www.cnblogs.com/huathy/p/17253806.html

浙公网安备 33010602011771号