Spring禁用websocket压缩 - > Sec-WebSocket-Extensions:permessage-deflate

时间:2015-08-04 08:46:15

标签: spring spring-security websocket spring-java-config

我有一个使用websockets和stomp协议的spring boot应用程序。由于我转移到spring-boot-starter-parent版本1.3.0.M2,我注意到在websocket握手中有一个额外的压缩标题,即

Sec-WebSocket-Extensions:permessage-deflate

这一切对我有用,但我希望有机会在运行开发版本时禁用此标头。当这个标题出现时,看来wireshark stomp plugging有问题。因此,如何在我的springsecurity java配置中为扩展WebSecurityConfigurerAdapter的SecurityConfigDevelopmentProfile禁用此标头的问题?

1 个答案:

答案 0 :(得分:0)

由于Spring Boot使用Tomcat,您可以尝试禁用它,如下所述:

https://stackoverflow.com/a/30148633/1210793