Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

using wss when site is served over https

A topic by cardgameai created 92 days ago Views: 56 Replies: 2
Viewing posts 1 to 2

Summary: I'd like to request for the websocket connection to support https. Use ws if over http and use wss if over https.

Thanks for making this game, I enjoy the ease of playing with a rules enforced simulator. One problem I noticed when trying to play multiplayer is that most services that share localhost with the internet, such as cloudflare tunnel, does so over https.

The websocket connection in marvel.js is hardcoded to use ws which does not work over https. If I manually change it to wss (the secure version), I'm able to get the site to work when served over https.

Developer

Hi @cardgameai,

Thank you for your feedback and for enjoying the game!

I wanted to let you know that I’ve updated the code to automatically select ws or wss based on the protocol used by the client. This should resolve the issue you mentioned with the WebSocket connection over HTTPS.

We will implement this change in the next version of the game (The current version is 0.5.8.3).

I’m glad you’re having a good time with the game, and I appreciate your support and suggestions. If you encounter any more issues or have further feedback, please don’t hesitate to reach out.

(1 edit)

Thanks for the quick update. With the next version, I will no longer need to manually edit marvel.js :)