Update to Spring IO version
- Update Spring Boot 1.2.3.RELEASE - Update Spring Security 4.0.0.RELEASE - Update Spring 4.1.6.RELEASE - Update Groovy 2.3.8 - Update Jackson 2.4.5 - Update Jedis 2.5.2 - Update Spring Data Redis 1.4.2 Fixes gh-126
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.simp.SimpMessageType;
|
||||
import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry;
|
||||
import org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer;
|
||||
|
||||
@@ -30,8 +29,8 @@ public class WebSocketSecurityConfig extends AbstractSecurityWebSocketMessageBro
|
||||
@Override
|
||||
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
|
||||
messages
|
||||
.antMatchers(SimpMessageType.MESSAGE,"/queue/**","/topic/**").denyAll()
|
||||
.antMatchers(SimpMessageType.SUBSCRIBE, "/queue/**/*-user*","/topic/**/*-user*").denyAll()
|
||||
.simpMessageDestMatchers("/queue/**","/topic/**").denyAll()
|
||||
.simpSubscribeDestMatchers("/queue/**/*-user*","/topic/**/*-user*").denyAll()
|
||||
.anyMessage().authenticated();
|
||||
}
|
||||
// @formatter:on
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package sample.mvc;
|
||||
|
||||
import org.springframework.security.web.csrf.CsrfToken;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class CsrfController {
|
||||
|
||||
@RequestMapping("/csrf")
|
||||
public CsrfToken csrf(CsrfToken token) {
|
||||
return token;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user