From 462deab26ffc9d38266e100403cf965a1cb59848 Mon Sep 17 00:00:00 2001 From: Sondre Larsen Ovrid Date: Sun, 15 Oct 2023 16:41:29 +0200 Subject: [PATCH] wip --- .../no/nav/veilarbperson/config/CustomWebMvcConfigurer.java | 3 ++- .../no/nav/veilarbperson/config/FnrUsageLoggerInterceptor.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/no/nav/veilarbperson/config/CustomWebMvcConfigurer.java b/src/main/java/no/nav/veilarbperson/config/CustomWebMvcConfigurer.java index e27c0602..b3d211b9 100644 --- a/src/main/java/no/nav/veilarbperson/config/CustomWebMvcConfigurer.java +++ b/src/main/java/no/nav/veilarbperson/config/CustomWebMvcConfigurer.java @@ -17,6 +17,7 @@ public CustomWebMvcConfigurer(final FnrUsageLoggerInterceptor fnrUsageLoggerInte @Override public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(fnrUsageLoggerInterceptor).addPathPatterns("/api/person", "/api/person/**", "/api/v2/person", "/api/v2/person/**"); + // TODO: Legg til addPathPatterns nĂ¥ ferdig med testing + registry.addInterceptor(fnrUsageLoggerInterceptor); } } diff --git a/src/main/java/no/nav/veilarbperson/config/FnrUsageLoggerInterceptor.java b/src/main/java/no/nav/veilarbperson/config/FnrUsageLoggerInterceptor.java index f1831b7e..5ed92e5e 100644 --- a/src/main/java/no/nav/veilarbperson/config/FnrUsageLoggerInterceptor.java +++ b/src/main/java/no/nav/veilarbperson/config/FnrUsageLoggerInterceptor.java @@ -20,6 +20,9 @@ public class FnrUsageLoggerInterceptor implements HandlerInterceptor { @Override public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) { + // TODO: Fjern denne linjen - kun for testing + log.debug("Inside preHandle"); + String requestURI = request.getRequestURI(); String queryString = request.getQueryString(); String fnrPattern = "(^|\\W)\\d{11}(?=$|\\W)";