Punishments somewhat working

This commit is contained in:
2022-04-02 18:34:19 -05:00
parent 1096ed1e09
commit 3dbc5e78bd
4 changed files with 105 additions and 4 deletions

View File

@ -41,10 +41,10 @@ public class AbstractServlet extends HttpServlet
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
String ipAddress = req.getHeader("X-FORWARDED-FOR");
String ipAddress = req.getRemoteAddr();
if (ipAddress == null)
{
ipAddress = req.getRemoteAddr();
ipAddress = req.getHeader("X-FORWARDED-FOR");
}
Log.log(ipAddress + " visited endpoint " + req.getHttpServletMapping().getMatchValue());
@ -79,7 +79,6 @@ public class AbstractServlet extends HttpServlet
});
}
@Data
public static class Mapping
{