I didn’t see where the previous request was closed and the forum automatically suggested I create a new topic, so here:
also I’m kinda scatterbrained right now so please ask questions if something isn’t clear
Based on this post:
https://forum.magicmirror.builders/topic/8469/how-to-run-as-https
Lines that are commented out (#) are pre-existing, shown for location reference only. They should not actually be commented out.
Lines that are commented out (//) can be toggled based on preference.
I don’t know node.js, or really javascript. My first instinct is to extract the config definition to the very top of the file. But it seems like the config is loaded via the server, and I’m trying to define the server via the config. I tried to run a squid proxy server to handle https but I couldn’t figure that out. Maybe the answer is to run HTTP and HTTPS simultaneously. Maybe you could have an ipWhitelist for each if you wanted to restrict HTTP access but not HTTPS. To be honest though, I think the whitelist should be handled by the OS’s firewall. iptables isn’t that difficult.
For the record, I’m using node serveronly and pushing to a chromecast via catt through cron.