From what I understand, you have a public website that has a websocket service running. Let's call it
and you access a wss service with Chrome via (as an example)
That site is hosted on a PC on your network. On that PC, you are trying to access the same service using chrome via
wss://localhost/mywsservice/index.html
and Chrome complains about the security certificate.
If that describes your case, then all you have to do is add the following line (adjusted with the domain that you are trying to access) to your hosts file on your PC
You can then access your site on the PC via
And Chrome should not be complaining about the certificate
Link:
How to edit hosts file:
https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
Note(s):
If you are trying to have other computers access your server locally (without going through the internet) then you have a couple of options:
1) If you router lets you manually add DNS entries, then enter a DNS entry for your server, using the server's local IP address for the IP address the DNS server points to. Some routers let you use the MAC address instead of the IP address, thus allowing for dynamic IP assignment.
2) You could modify the hosts file on each PC on the network
3) If you are running a Windows Domain, you could add an entry for your server to the DNS server on your domain
4) If you use your own DNS server internally (Linux, etc), the add the entry to your DNS server