Browse Source

fixed info

master
Niklas 4 years ago
parent
commit
6e87878e3d
  1. 2
      src/main/java/de/gurkengewuerz/termbin/Server/APIHandler.java
  2. 4
      src/main/java/de/gurkengewuerz/termbin/Server/DataHandler.java

2
src/main/java/de/gurkengewuerz/termbin/Server/APIHandler.java

@ -25,7 +25,7 @@ public class APIHandler extends AbstractHandler {
@Override
public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
Logger.getLogger(getClass().getName()).log(Level.INFO, "API Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - " + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - api - " + s);
if (Termbin.getConfig().isBanned(request.getRemoteAddr())) {
request.setHandled(true);

4
src/main/java/de/gurkengewuerz/termbin/Server/DataHandler.java

@ -21,8 +21,8 @@ public class DataHandler extends AbstractHandler {
@Override
public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
Logger.getLogger(getClass().getName()).log(Level.INFO, "API Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - " + s);
Logger.getLogger(getClass().getName()).log(Level.INFO, "DATA Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - data - " + s);
if (Termbin.getConfig().isBanned(request.getRemoteAddr())) {
request.setHandled(true);

Loading…
Cancel
Save