Friday, April 19, 2024
HomeGolangGorilla Net Sockets dwell doesn't work - Getting Assist

Gorilla Net Sockets dwell doesn’t work – Getting Assist


I lower and pasted a pattern code from right here This code works out of the field on my native laptop.

However when shifting to a VPS with Nginx proxy this fails. As this “converts” from https:// to wss:// I’ve no clue what I’ve accomplished incorrect. https://ws.go4webdev.org (dwell)

image

The console offers this error:

WebSocket connection to ‘wss://localhost:8080/echo’ failed:

And the web page exhibits up like this:

image

I believe that it’s this line that’s the drawback, however I can’t determine the syntax.

//var addr = flag.String("addr", "127.0.0.1:8080", "http service tackle") <-- works on my native laptop

var addr = flag.String("addr", "https://ws.go4webdev.org", "http service tackle") <-- fails on VPS

My intestine feeling tells me that that is near a CORS error, however I can’t affirm.

Any clue how I could make this work?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments