Skip to content

Commit

Permalink
Fix auto update cert bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeguy committed Feb 9, 2024
1 parent a4c4c5b commit c813f7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions object/cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ func TestCheckCerts(t *testing.T) {
casdoor.InitCasdoorConfig()
proxy.InitHttpClient()

var err error
certMap, err = getCertMap()
if err != nil {
panic(err)
}

site, err := getSite("admin", "test-site")
if err != nil {
panic(err)
Expand Down
4 changes: 4 additions & 0 deletions object/site_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ func (site *Site) checkCerts() error {
}

for _, domain := range domains {
if site.Owner != "admin" && strings.HasSuffix(domain, ".casdoor.com") {
continue
}

cert, err := GetCertByDomain(domain)
if err != nil {
return err
Expand Down

0 comments on commit c813f7e

Please sign in to comment.