Example usage for org.springframework.web.socket.server.support OriginHandshakeInterceptor OriginHandshakeInterceptor

List of usage examples for org.springframework.web.socket.server.support OriginHandshakeInterceptor OriginHandshakeInterceptor

Introduction

In this page you can find the example usage for org.springframework.web.socket.server.support OriginHandshakeInterceptor OriginHandshakeInterceptor.

Prototype

public OriginHandshakeInterceptor(Collection<String> allowedOrigins) 

Source Link

Document

Constructor using the specified allowed origin values.

Usage

From source file:ch.rasc.wampspring.config.WebMvcWampWebSocketEndpointRegistration.java

protected HandshakeInterceptor[] getInterceptors() {
    List<HandshakeInterceptor> handshakeInterceptors = new ArrayList<>();
    handshakeInterceptors.addAll(this.interceptors);
    handshakeInterceptors.add(new OriginHandshakeInterceptor(this.allowedOrigins));
    return handshakeInterceptors.toArray(new HandshakeInterceptor[handshakeInterceptors.size()]);
}