Where to get an HTTPS certificate for localhost
If you download the discord client, unpack it, and look in the bootstrap folder (which should be next to the app.asar folder), you'll find discord_rpc.zip. Unpack that, look in data, and you'll find this_is_not_a_security_issue.{crt,key} which is the public and private key for an HTTPS certificate for *.discordapp.io, which is a domain that resolves to 127.0.0.1. This could be useful for testing HTTPS on localhost.