The following URL used to return 200 with Spring Boot 2.5
http://localhost:8080//actuator/health
After upgrading to 2.6 it no longer works and returns 404 Not Found
I spotted the error because some of the project's integration tests were failing (requests returned 404). Then I noticed the double slash, and after removing it, the issue was fixed.
I just want to understand which feature causes this new behavior?
I went through the 2.6 release notes several times, but nothing rings a bell.
Thanks in advance!
CodePudding user response:
Check this .. it is for spring boot 2.6
CodePudding user response:
Are you able to access actuator endpoint with single slash? like http://localhost:8080/actuator/health
If yes, then did you configure the spring security for your application? There is a configuration you can define where your application will allow consecutive slashes in url.
@Bean HttpFirewall httpFirewall() { StrictHttpFirewall firewall = new StrictHttpFirewall(); firewall.setAllowUrlEncodedDoubleSlash(true); return firewall; }
