Seems I need to use HTTPs for firefox security issues with rest.
https://developer.mozilla.org/en-US/docs/Web/Security/Mixedcontent/Howtofixwebsitewithmixed_content
auto settings = new HTTPServerSettings;
settings.bindAddresses = ["::1", "127.0.0.1"];
settings.port = 443;
settings.tlsContext = createTLSContext(
TLSContextKind.server,
TLSVersion.tls1_2
);
listenHTTP(settings, router);
gives the error:
Handling of connection failed: Accepting SSL tunnel: error:140760FC:SSL routines:SSL23GETCLIENT_HELLO:unknown protocol (336027900)
Of course, it works fine as a normal server.
changing TLSVersion to ssl3 or any gives
Handling of connection failed: Accepting SSL tunnel: error:1408A0C1:SSL routines:SSL3GETCLIENT_HELLO:no shared cipher (336109761)
which I assume I need a certificate and such? Do we always need a certificate or does tls1_2 create mock one for us? In the first, how do I create a certificate and all that so I can get the https server up and running?
Thanks.