Skip to content

Commit ed1828c

Browse files
GiteaBotwxiaoguang
andauthored
Fix ACME panic (#33178) (#33186)
Backport #33178 by @wxiaoguang Fix #33177, Manually tested: ```` 1.7364311850484018e+09 info maintenance started background certificate maintenance {"cache": "0x1400ca64180"} 1.736431185054049e+09 info obtain acquiring lock {"identifier": "example.com"} 1.736431185058073e+09 info obtain lock acquired {"identifier": "example.com"} 1.736431185058133e+09 info obtain obtaining certificate {"identifier": "example.com"} ```` Co-authored-by: wxiaoguang <[email protected]>
1 parent 3cfff5a commit ed1828c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/web_acme.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ func runACME(listenAddr string, m http.Handler) error {
5454
altTLSALPNPort = p
5555
}
5656

57-
magic := &certmagic.Default
58-
magic.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
57+
// FIXME: this path is not right, it uses "AppWorkPath" incorrectly, and writes the data into "AppWorkPath/https"
58+
// Ideally it should migrate to AppDataPath write to "AppDataPath/https"
59+
certmagic.Default.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
60+
magic := certmagic.NewDefault()
5961
// Try to use private CA root if provided, otherwise defaults to system's trust
6062
var certPool *x509.CertPool
6163
if setting.AcmeCARoot != "" {

0 commit comments

Comments
 (0)