Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1580

Securing a Socket.IO Websocket and restricting it to a domain

$
0
0

So I am an absolute beginner at Socket.IO, but I have a pre built application that needs to be secured in two ways: It needs to be transmitted over HTTPS and it needs to be restricted to only server data to a specific domain.

This is the code for the emitter thus far: https://github.com/Bitzz/Pokemon-Go-Coords/blob/master/discord-bot/index.jsHow do I go about securing it?I assume something along the lines of

io.set('origins', 'https://example.com:*');

on line 156 would restrict it to one domain... Could I maybe blacklist only specific domains instead?Beyond that, how do I make it emit over https via wss?

Currently the console shows:bye bye ws over https

I think I can figure out how to configure the web sided reader to look for the over https websocket, but getting it to send is not something I know how to figure out. Please use simple words I am not a smart cookie. :(


Viewing all articles
Browse latest Browse all 1580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>