✓ Solved

Spring boot app is not able to establish websocket connection

Hi i have deployed my spring boot app which is a simple chat app but i am not able to establish a websocket connection with this error

Refused to execute script from 'http://chat.harshwardhanshettyprofile.website/server1/677/jy4c135k/jsonp?c=_jp.ae1hmwc' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

are there some settings we have to do to use websocket in linode? I am totally new to deployment and this app is totally working fine in my local dev without any errors and establishing websocket connection, Please Help!!

1 Reply

✓ Best Answer

According to some of the information I've found, this is likely related to an element in your application attempting to load something that is not present. In this Stack Overflow post, the issue was an incorrect file path and in this article titled How to fix Refused to Execute Script Error - its MIME type ('text/html') is not Executable, the following line needed to be added to a relevant php file

header(‘Content-Type: application/javascript‘);

If you're still having an issue after looking over these references, you may want to check out the Spring Boot documentation or join the Spring Glitter Community.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct