lots of stuff

This commit is contained in:
Anthony Stirling
2023-05-17 23:58:15 +01:00
parent 54e7998bf7
commit 320f56e473
10 changed files with 153 additions and 46 deletions

View File

@@ -17,12 +17,10 @@ public class EndpointInterceptor implements HandlerInterceptor {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String requestURI = request.getRequestURI();
System.out.println("trying " + requestURI);
if (!endpointConfiguration.isEndpointEnabled(requestURI)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "This endpoint is disabled");
return false;
}
return true;
}
}
}