Skip to content

Commit

Permalink
增加 禁止公网访问
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo894 committed Sep 30, 2024
1 parent 3e8ac48 commit 4d674f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/ani/rss/util/ServerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ public static SimpleServer create(String... args) {
String ip = getIp();
if (isInnerIP) {
if (!PatternPool.IPV4.matcher(ip).matches()) {
res.send404("404 Not Found");
return;
}
if (!Ipv4Util.isInnerIP(ip)) {
res.send404("404 Not Found");
return;
}
}
Expand Down

0 comments on commit 4d674f1

Please sign in to comment.