mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: generate a minimal Caddyfile with verify handler alongside caddy.json
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package caddyconfig
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
)
|
||||
|
||||
func GenerateCaddyfile(containers []api.ServiceContainer, verifyResponse string) (string, error) {
|
||||
return fmt.Sprintf(`http:// {
|
||||
handle %s {
|
||||
respond "%s" 200
|
||||
}
|
||||
log
|
||||
}
|
||||
`, VerifyPath, verifyResponse), nil
|
||||
}
|
||||
Reference in New Issue
Block a user