title: Handshake failed due to invalid Upgrade header: null
body: <p>I have deployed an application on Heroku. When I am trying to connect from other system, it works fine. But when I am trying to access it from my company's system , it get this URL - </p>
  
  <pre><code>o.s.w.s.s.s.DefaultHandshakeHandler      : Handshake failed due to invalid Upgrade header: null
  </code></pre>
  
  <p>I have gone throw <a href="https://stackoverflow.com/questions/31211919/spring-websocket-handshake-failed-due-to-invalid-upgrade-header-null">this</a> but dont know how to configure the nginx on Heroku. Also I read somewhere  all dynos use a common runtime , hence its not configurable.
  I am using  <strong>SockJs</strong> from front-end and <strong>Spring-Boot</strong> in backend. 
  The Request from browser - </p>
  
  <pre><code>GET wss://ketu.herokuapp.com/gs-guide-websocket/873/l0ffiwck/websocket?
  token=%22005e6574-9c25-4071-954b-70c8f2c79de2%22 HTTP/1.1
  Host: ketu.herokuapp.com
  Connection: Upgrade
  Pragma: no-cache
  Cache-Control: no-cache
  Upgrade: websocket
  Origin: https://ketu.herokuapp.com
  Sec-WebSocket-Version: 13
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,             like Gecko) Chrome/62.0.3202.94 Safari/537.36
  Accept-Encoding: gzip, deflate, br
  Accept-Language: en-US,en;q=0.9
  Cookie: JSESSIONID=4CE4921FCD813B9A4DBC7656F6D80286
  Sec-WebSocket-Key: tSa9El0a/TL1fVdW586mhw==
  Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
  </code></pre>
  
  <p>My WebSocketConfig - </p>
  
  <pre><code>@EnableWebSocketMessageBroker
  @Configuration
      public class WebSocketConfig implements WebSocketMessageBrokerConfigurer{
  
      @Override
      public void configureMessageBroker(MessageBrokerRegistry registry) {
          registry.setApplicationDestinationPrefixes("/app");
          registry.setUserDestinationPrefix("/user");
          registry.enableSimpleBroker("/topic","/queue","/user");
      }
  
      @Override
      public void registerStompEndpoints(StompEndpointRegistry registry) {
          registry.addEndpoint("/gs-guide-websocket").addInterceptors(new HandshakeInterceptorIml()).withSockJS();
      }
  }
  </code></pre>