You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+50-5
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,12 @@ We require a recent version of [Leiningen](https://leiningen.org/), and a minimu
10
10
11
11
### TLS/SSL
12
12
13
-
To develop against TLS, (effectively mandatory for HTTP/2+) it's best to install your own root authority and certificates. The [mkcert](https://github.com/FiloSottile/mkcert) tool is very helpful.
13
+
To develop against TLS, (effectively mandatory for HTTP/2+) it's helpful to install
14
+
your own root authority and certificates. The [mkcert](https://github.com/FiloSottile/mkcert) tool is ideal for that.
15
+
While a self-signed certificate will work, it's possible to run into warnings and
16
+
odd behavior.
14
17
18
+
#### Mkcert
15
19
An example setup:
16
20
```shell
17
21
# first check $JAVA_HOME is not empty, mkcert will use it to know where to install
@@ -20,24 +24,65 @@ echo $JAVA_HOME
20
24
# this is installs the root certificate authority (CA) for browsers/OS/Java
21
25
mkcert -install
22
26
23
-
# if you have multiple JVMs in use, you will need to install the CA for each
27
+
# if you have multiple JVMs in use, you will need to install the CA for each one separately
24
28
export JAVA_HOME=/path/to/some/other/jdk
25
29
TRUST_STORES=java mkcert -install
26
30
27
31
# this will generate a cert file and a key file in .pem format
28
32
mkcert aleph.localhost localhost 127.0.0.1 ::1
29
-
# e.g., aleph.localhost+3-key.pem and aleph.localhost+3.pem
33
+
# e.g., aleph.localhost+3.pem and aleph.localhost+3-key.pem
30
34
```
31
35
36
+
If you are using an HTTP tool with its own trust store, like Insomnia, you will
37
+
need to add the root CA to its trust store as well.
38
+
39
+
For Insomnia, it's hidden under the project dropdown in the top center, under
40
+
Collection Settings > Client Certificates > CA Certificate. (NB: you don't need
41
+
a client certificate, just the CA.)
42
+
43
+
For curl, you would run something like: `curl --cacert "$(mkcert -CAROOT)/rootCA.pem"`
44
+
45
+
Warning: As of August 2023, many tools still do not support HTTP/2: Postman,
46
+
HTTPie, RapidAPI/Paw, and many others.
47
+
48
+
#### DNS
49
+
You'll need to add `aleph.localhost` to your `/etc/hosts` file, e.g.:
0 commit comments