Skip to content

Commit f60f803

Browse files
committed
feat: ramdisk cert cache
1 parent 177d55b commit f60f803

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var (
2828
staging = flag.Bool("s", false, "use staging CA")
2929
upstream = flag.Int("u", 8080, "upstream port")
3030
allowedPaths = flag.String("p", "", "Paths to proxy to the upstream server (all if empty)")
31+
certCache = flag.String("c", "/mnt/ramdisk/certs", "certificate cache directory")
3132
verbose = flag.Bool("v", false, "verbose logging")
3233

3334
@@ -101,6 +102,7 @@ func main() {
101102
mux := http.NewServeMux()
102103

103104
// Request TLS certificate
105+
certmagic.Default.Storage = &certmagic.FileStorage{Path: *certCache}
104106
certmagic.DefaultACME.Email = email
105107
if *staging {
106108
certmagic.DefaultACME.CA = certmagic.LetsEncryptStagingCA

0 commit comments

Comments
 (0)