restrict private IP access

This commit is contained in:
nkanaev
2025-10-02 10:16:35 +01:00
parent ac9b635ed8
commit 9f93298cf9
4 changed files with 71 additions and 0 deletions

View File

@@ -513,6 +513,10 @@ func (s *Server) handlePageCrawl(c *router.Context) {
})
return
}
if isInternalFromURL(url) {
log.Printf("attempt to access internal IP %s from %s", url, c.Req.RemoteAddr)
return
}
body, err := worker.GetBody(url)
if err != nil {