79223846

Date: 2024-11-25 16:29:26
Score: 1
Natty:
Report link

In addition to the changes provided by Mohamed, I also needed to change my request matcher.

@Bean
public RequestMatcher requestMatcher() {
    // if (!swagger && !error) then apply CustomAuthenticationFilter
    return new NegatedRequestMatcher(new OrRequestMatcher(Arrays.asList(
        new AntPathRequestMatcher("/api-docs/**"),
        new AntPathRequestMatcher("/error")
    )));
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Emalee