1. 19 2月, 2015 2 次提交
    • S
      Change SockJS and Websocket default allowedOrigins to same origin · 23fa37b0
      Sebastien Deleuze 提交于
      This commit adds support for a same origin check that compares
      Origin header to Host header. It also changes the default setting
      from all origins allowed to only same origin allowed.
      
      Issues: SPR-12697, SPR-12685
      (cherry picked from commit 6062e155)
      23fa37b0
    • S
      Fix SockJS origin check · cc78d40c
      Sebastien Deleuze 提交于
      This commit introduces the following changes:
       - Requests without Origin header are not rejected anymore
       - Disable Iframe when allowedOrigins is not empty and not equals to *
       - The Iframe is not cached anymore in order to have a reliable origin check
       - allowedOrigins must not be null or empty
       - allowedOrigins format is now validated (should be * or start by http(s)://)
      
      Issue: SPR-12660
      (cherry picked from commit 9b3319b3)
      cc78d40c
  2. 01 11月, 2014 1 次提交
  3. 27 10月, 2014 2 次提交
    • S
      Add an option to disable automatic addition of CORS header · 58f4014b
      Sebastien Deleuze 提交于
      Issues: SPR-12283
      58f4014b
    • S
      Add an option to set an Origin whitelist for Websocket and SockJS · 743356fa
      Sebastien Deleuze 提交于
      This commit introduces a new OriginHandshakeInterceptor. It filters
      Origin header value against a list of allowed origins.
      
      AbstractSockJsService as been modified to:
       - Reject CORS requests with forbidden origins
       - Disable transport types that does not support CORS when an origin
         check is required
       - Use the Origin request header value instead of "*" for
         Access-Control-Allow-Origin response header value
         (mandatory when  Access-Control-Allow-Credentials=true)
       - Return CORS header only if the request contains an Origin header
      
      It is possible to configure easily this behavior thanks to JavaConfig API
      WebSocketHandlerRegistration#addAllowedOrigins(String...) and
      StompWebSocketEndpointRegistration#addAllowedOrigins(String...).
      It is also possible to configure it using the websocket XML namespace.
      
      Please notice that this commit does not change the default behavior:
      cross origin requests are still enabled by default.
      
      Issues: SPR-12226
      743356fa
  4. 08 10月, 2014 1 次提交
  5. 27 9月, 2014 2 次提交
  6. 12 8月, 2014 1 次提交
  7. 27 6月, 2014 2 次提交
    • B
      Fix unit test for SPR-11919 · b2f64450
      Brian Clozel 提交于
      Issue: SPR-11919
      b2f64450
    • B
      Workaround for WFLY-3474 NullPointerException · 24cdefb7
      Brian Clozel 提交于
      Prior to this commit, the ServletResponseHttpHeaders.get method
      would throw an NPE when used under Wildfly 8.0.0.Final and 8.1.0.Final.
      This can be traced to WFLY-3474, which throws an NPE when calling
      HttpServletResponse.getHeaders("foo") and that header has not
      been defined prior to that.
      This would cause NPE being thrown by AbstractSockJsService when
      checking for CORS HTTP headers in the server HTTP response.
      
      This commit surrounds that method call in AbstractSockJsService and
      guards against this issue.
      
      Issue: SPR-11919
      24cdefb7
  8. 06 3月, 2014 1 次提交
    • R
      Improve CORS handling in AbstractSockJsService · 49d7bda7
      Rossen Stoyanchev 提交于
      After this change, AbstractSockJsService does not add CORS headers if
      the response already contains an "Access-Control-Allow-Origin" header.
      Essentially it backs off assuming CORS headers are handled centrally
      e.g. through a Filter.
      
      In order to support this, the ServletServerHttpResponse now returns an
      instance of HttpHeaders that also provides access to headers already
      present in the HttpServletResponse.
      
      Issue: SPR-11443
      49d7bda7
  9. 05 3月, 2014 1 次提交
    • S
      Clean up "abstract" test issues · 9891bdc7
      Sam Brannen 提交于
       - Deleted empty AbstractWebSocketClientTests class.
      
       - AbstractServletHandlerMethodTests and AbstractHttpRequestTests are
         now actually declared as abstract.
      
       - The following classes are not abstract but currently have an
         "Abstract" prefix and therefore get ignored by the Gradle build.
         This commit renames each of these by deleting the "Abstract" prefix.
      
         - AbstractFlashMapManagerTests
         - AbstractMappingContentNegotiationStrategyTests
         - AbstractSockJsServiceTests
         - AbstractWebSocketHandlerRegistrationTests
      9891bdc7
  10. 22 1月, 2014 1 次提交
  11. 08 12月, 2013 1 次提交
    • J
      Introduced SockJsSession interface and moved SockJsSessionFactory and... · 1f9b833c
      Juergen Hoeller 提交于
      Introduced SockJsSession interface and moved SockJsSessionFactory and SockJsServiceConfig to sockjs.transport; added initialize(SockJsServiceConfig) method to TransportHandler interface; extracted TransportHandlingSockJsService from DefaultSockJsService; moved sockjs.support.frame to sockjs.frame and extracted (Default)SockJsFrameFormat from SockJsFrame; moved SockJsHttpRequestHandler to sockjs.support; removed Jackson 1.x support
      1f9b833c
  12. 08 11月, 2013 1 次提交
  13. 01 10月, 2013 1 次提交
  14. 27 9月, 2013 1 次提交
  15. 03 8月, 2013 5 次提交
  16. 01 8月, 2013 2 次提交
    • R
      Refactor and polish SockJS package structure · ad40ecff
      Rossen Stoyanchev 提交于
      After this change the top-level sockjs package contains the main types
      for use in applications.
      ad40ecff
    • R
      Add SockJsMessageCodec · dad7115c
      Rossen Stoyanchev 提交于
      A SockJS message frame is an array of JSON-encoded messages and before
      this change the use of the Jackson 2 library was hard-coded.
      
      A Jackson 2 and Jackson 1.x implementations are provided and
      automatically used if those libraries are present on the classpath.
      
      Issue: SPR-10800
      dad7115c
  17. 28 6月, 2013 1 次提交
  18. 16 5月, 2013 1 次提交
  19. 15 5月, 2013 1 次提交
  20. 14 5月, 2013 1 次提交
  21. 06 5月, 2013 1 次提交