Skip to content

Certbucket implements acme/autocert Cache using a bucket on Google storage.

License

Notifications You must be signed in to change notification settings

cooldarkdryplace/certbucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

certbucket

Certbucket implements acme/autocert Cache using a bucket on Google storage. If the bucket does not exist, it will be created.

Usage

	cache, err := certbucket.New("your-project-id", "cache-bucket-name")
	if err != nil {
		return err
	} 

	m := autocert.Manager{
		Cache:      cache,
		Prompt:     autocert.AcceptTOS,
		HostPolicy: autocert.HostWhitelist("example.com"),
	}

	s := &http.Server{
		Addr:      ":https",
		Handler:   router,
		TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
	}

	log.Fatal(s.ListenAndServeTLS("", ""))

Testing

Before running tests make sure that your Google Cloud SDK is installed and configured. Set GOOGLE_PROJECT_ID environment variable.

About

Certbucket implements acme/autocert Cache using a bucket on Google storage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages