Error during WebSocket handshake: Unexpected response code: 403 : <p>I have implemented <strong>WebSockets</strong> with <strong>Spring Boot Application</strong> and have the below error message when trying to test the ws connection with the chrome extension '<strong>Smart websocket client</strong>'. 
However, I have no problem when run the Spring Boot Application locally.</p>

<pre><code>WebSocket connection to 'ws://192.168.X.XYZ:8080/test' failed: 
Error during WebSocket handshake: Unexpected response code: 403
</code></pre>

<p>The only difference which I see is in the Request headers:</p>

<p>In the one it works - Origin:<a href="http://192.168.X.XYZ:8080" rel="noreferrer">http://192.168.X.XYZ:8080</a></p>

<p>In the one it does not work - Origin:chrome-extension://omalebghpgejjiaoknljcfmglgbpocdp</p>

<p>What I did in the <strong>WebSocketConfig</strong> class is below:</p>

<pre><code>@Override
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
    registry.addHandler(myHandler(), "/test").setAllowedOrigins("http://192.168.X.XYZ:8080");
}
</code></pre>

<p>and still does <strong>not</strong> work.</p>

<p>Could you please advise what the reason for that error might be and how to fix it? </p>

<p>Thank you in advance.</p>
