Commit 0babfcb
committed
✨Please port thruster "Automatic TLS certificate management with Let's Encrypt" to current user_server-web-http project, you can read thruster source code from
Below is thruster's Automatic TLS function location, as a hint and maybe not complete:
- HTTP(S) servers: [internal/server.go](mdc:internal/server.go)
- HTTP always listens on `HTTP_PORT`; if TLS is configured, HTTP only redirects to HTTPS
- HTTPS listens on `HTTPS_PORT` with autocert from `ACME_DIRECTORY` and optional EAB
- Timeouts come from config: idle/read/write
- TLS decisions: [internal/config.go](mdc:internal/config.go)
- `HasTLS()` is true when `TLS_DOMAIN` has one or more domains
- Certificates cached under `STORAGE_PATH`
Please remember using configs/user_server.yml style configure instead of ENV style.
If you need change sponge, the direct dependency of user_server-web-http, do it at `/Users/guochunzhong/git/oss/sponge` directly./Users/guochunzhong/git/oss/thruster, no need do remote clone from https://github.com/basecamp/thruster.1 parent a0221f4 commit 0babfcb
File tree
8 files changed
+368
-141
lines changed- cmd/user_server/initial
- configs
- deployments/kubernetes
- internal
- config
- server
8 files changed
+368
-141
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
| |||
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
86 | | - | |
87 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments