Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

issac's avatar
Level 2

Node js and socket.io in production using HTTPS

I run my similar own implementation of chat videos using redis and socket.io: https://www.laracasts.com/series/real-time-laravel-with-socket-io/episodes/3 in localhost but when I upload to my real server then this error appear: Mixed Content: The page at 'https://mysite.com' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint.

How can I run this in https?

Thanks.

0 likes
4 replies
jryd's avatar

The error is telling you that you are making requests to an endpoint that is not secure (i.e HTTP rather than HTTPS).

You should review the code for your project and check for any endpoints that you are requesting over HTTP and switch to requesting them via their HTTPS endpoint.

On an HTTPS webpage you can only make AJAX requests to a HTTPS webpage.

jryd's avatar

Is there perhaps a different URL on your webpage that is invalid? Most developer tools tell you what URL this is, or you can find it somewhere.

Perhaps it is a CSS or JS file?

jkarthikeyan's avatar

Hi Issac,

Did you solve the problem, I am also facing the same issue. My socket port is not configured with https

Please or to participate in this conversation.