For me, this is absolutely crucial because my web app checks cookies on startup, which must exist to continue the app.
Cookies are very special, and can only be retrieved on the same domain with Javascript/wasm bindings.
Hence, I need to serve my application with self-signed certs.
This is my typical workflow:
Create an /etc/hosts entry:
127.0.0.1 localhost.mydomain.com
Create local certs:
brew install mkcert
brew install nss
mkcert -install
mkcert -key-file ~/.cert/mydomain-key.pem -cert-file ~/.cert/mydomain-cert.pem localhost.mydomain.com
Then, I serve with Trunk:
[serve]
addresses = ["127.0.0.1"]
port = 3000
aliases = ["https://localhost.mydomain.com"]
ws_protocol = "wss"
tls_key_path = "~/.cert/mydomain-key.pem"
tls_cert_path = "~/.cert/mydomain-cert.pem"
This would serve on https://localhost.mydomain.com:3000, and hence my bevy app can load cookies properly for the .mydomain.com path
For me, this is absolutely crucial because my web app checks cookies on startup, which must exist to continue the app.
Cookies are very special, and can only be retrieved on the same domain with Javascript/wasm bindings.
Hence, I need to serve my application with self-signed certs.
This is my typical workflow:
Create an
/etc/hostsentry:Create local certs:
Then, I serve with Trunk:
This would serve on https://localhost.mydomain.com:3000, and hence my bevy app can load cookies properly for the
.mydomain.compath