-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actuator doesn't use the CORS Configuration with default security config #9548
Comments
A workaround is to use a custom security config, e.g. @SpringBootApplication
public class ActuatorcorsApplication extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.httpBasic().and().cors();
}
public static void main(String[] args) {
SpringApplication.run(ActuatorcorsApplication.class, args);
}
} I think the |
Any chance to have this backported to 1.5.x too? |
Let's see what the fix looks like, but it feels like something that would be reasonable to include in 1.5.x |
The fix is pretty straight-forward and I think it can be backported to 1.5.x |
@ptahchiev It's already there |
The actuator endpoints don't seem to respect the cors configuration with spring security default configuration. So as per @dsyer suggestion on the gitter channel I'm opening this issue for further investigation.
Steps to reproduce:
OPTIONS
request against/env
and expect return status is 200. What is actually returned is 401.Here's a sample project to reproduce the problem: https://github.com/ptahchiev/boot-cors-problem
The text was updated successfully, but these errors were encountered: