"Blank" was loaded over https but...

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

"Blank" was loaded over https but...

Postby Ninjaoninja2 » 24 Mar 2018, 16:13

Hello,
I'm having trouble with a JavaScript error, anytime I try to connect to SmartFoxServer from my server which has a valid, custom ssl certificate installed, I'm getting the follow error:
The page at 'domainhere' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://domainhere:8080/BlueBox/websocket'. This request has been blocked; this endpoint must be available over WSS.
Like I said my certificate is working and is valid, not sure what's going on here...
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: "Blank" was loaded over https but...

Postby Bax » 26 Mar 2018, 07:40

You have to make the API use WSS to connect.
In order to do this, in the configuration object you pass to the SmartFox constructor, set the useSSL parameter to true.
http://docs2x.smartfoxserver.com/api-do ... rtFox.html
Paolo Bax
The SmartFoxServer Team
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: "Blank" was loaded over https but...

Postby Ninjaoninja2 » 26 Mar 2018, 12:37

Bax wrote:You have to make the API use WSS to connect.
In order to do this, in the configuration object you pass to the SmartFox constructor, set the useSSL parameter to true.
http://docs2x.smartfoxserver.com/api-do ... rtFox.html

Ah, simple error. Thanks Bax!

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 28 guests