diff options
author | jbion <joffrey.bion@amadeus.com> | 2016-12-19 01:51:38 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2016-12-19 02:42:09 +0100 |
commit | 4a2d35912246a4cb22a06770aa3fe0e5e3e7fc78 (patch) | |
tree | 6b5f3152bbfa32cb608d4b3910b587a3f3828f9b /src/main/java/org/luxons | |
parent | Move session attribute keys to a single file to ensure unicity more easily (diff) | |
download | seven-wonders-4a2d35912246a4cb22a06770aa3fe0e5e3e7fc78.tar.gz seven-wonders-4a2d35912246a4cb22a06770aa3fe0e5e3e7fc78.tar.bz2 seven-wonders-4a2d35912246a4cb22a06770aa3fe0e5e3e7fc78.zip |
Allow cross-origin for frontend server proxy
Diffstat (limited to 'src/main/java/org/luxons')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/config/WebSocketConfig.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/config/WebSocketConfig.java b/src/main/java/org/luxons/sevenwonders/config/WebSocketConfig.java index 81c90c9b..83629d6a 100644 --- a/src/main/java/org/luxons/sevenwonders/config/WebSocketConfig.java +++ b/src/main/java/org/luxons/sevenwonders/config/WebSocketConfig.java @@ -24,7 +24,10 @@ public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public void registerStompEndpoints(StompEndpointRegistry registry) { - registry.addEndpoint("/seven-wonders-websocket").setHandshakeHandler(handshakeHandler()).withSockJS(); + registry.addEndpoint("/seven-wonders-websocket") + .setHandshakeHandler(handshakeHandler()) + .setAllowedOrigins("http://localhost:3000") // to allow frontend server proxy requests in dev mode + .withSockJS(); } @Bean |