Skip to content

Commit

Permalink
feat: ramdisk cert cache
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jan 30, 2025
1 parent 177d55b commit f60f803
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var (
staging = flag.Bool("s", false, "use staging CA")
upstream = flag.Int("u", 8080, "upstream port")
allowedPaths = flag.String("p", "", "Paths to proxy to the upstream server (all if empty)")
certCache = flag.String("c", "/mnt/ramdisk/certs", "certificate cache directory")
verbose = flag.Bool("v", false, "verbose logging")

email = "[email protected]"
Expand Down Expand Up @@ -101,6 +102,7 @@ func main() {
mux := http.NewServeMux()

// Request TLS certificate
certmagic.Default.Storage = &certmagic.FileStorage{Path: *certCache}
certmagic.DefaultACME.Email = email
if *staging {
certmagic.DefaultACME.CA = certmagic.LetsEncryptStagingCA
Expand Down

0 comments on commit f60f803

Please sign in to comment.