2
我用弹簧启动器与不同的端口像以下弹簧引导驱动器禁用CSRF
server.port=8080
management.port=8989
而在应用程序中,我想用enable-csrf=true
,但我不希望在驱动器使用csrf
港口。因为我想使用批量POST请求给jolokia。
只有排除/actuator
不聪明。
http.csrf().ignoringAntMatchers("/actuator/**");
像以下属性是为我好(BT management.security.enable-csrf
是不存在的)。
security.enable-csrf=true
management.security.enable-csrf=false
有没有什么好的解决方案?
我知道你正在尝试做的,这是一个有点棘手...... [可能的解决方法(HTTP:/ /stackoverflow.com/questions/31143703/spring-boot-management-port-and-spring-security) – dkanejs