timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

HTTPS Server if TLS_CERT & TLS_KEY are specified #162

Closed zohassadar closed 7 months ago

zohassadar commented 8 months ago

I run my local instance of nestrischamps on a computer that isn't my normal desktop, so in order to prevent the browser complaining about permission issues with either the webcam or serial port over HTTP, I bring the server up with a self signed certificate in HTTPS mode. This change modifies server.js to bring up an HTTPS server if a cert file and key file are specified with environment variables. This also modifies the playback link to be HTTPS.

timotheeg commented 7 months ago

Merged after adding a commit to lint!

timotheeg commented 7 months ago

Couple of notes on http vs. https: