INNER CODE UNIT · Go

file

jcmoraisjr/haproxy-ingress · pkg/acme/client_test.go:94

		file := wwwpublic + uri
		if token == "" {
			return os.Remove(file)
		}
		if err := os.MkdirAll(wwwpublic+"/.well-known/acme-challenge", 0755); err != nil {
			return err
		}
		return os.WriteFile(file, []byte(token), 0644)
	}
	if token == "" {
		return nil
	}
	out := fmt.Sprintf("%s%s = %s", domain, uri, token)
	if err := os.WriteFile("/tmp/out", []byte(out), 0644); err != nil {
		return err
	}
	// 20s to copy the challenge from /tmp/out and update the server
	time.Sleep(20 * time.Second)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…