mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: add header to generated Caddyfile that it's autogenerated
This commit is contained in:
@@ -17,7 +17,11 @@ import (
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
)
|
||||
|
||||
const caddyfileTemplate = `http:// {
|
||||
const (
|
||||
caddyfileHeader = `# This file is autogenerated by Uncloud. Do not edit manually.
|
||||
# Any manual changes will be overwritten on the next update.
|
||||
`
|
||||
caddyfileTemplate = `http:// {
|
||||
handle {{.VerifyPath}} {
|
||||
respond "{{.VerifyResponse}}" 200
|
||||
}
|
||||
@@ -47,6 +51,7 @@ https://{{$hostname}} {
|
||||
log
|
||||
}{{end}}
|
||||
`
|
||||
)
|
||||
|
||||
// CaddyfileGenerator generates a Caddyfile configuration for the Caddy reverse proxy.
|
||||
type CaddyfileGenerator struct {
|
||||
@@ -188,7 +193,7 @@ func (g *CaddyfileGenerator) Generate(ctx context.Context, records []store.Conta
|
||||
}
|
||||
}
|
||||
|
||||
return caddyfile, nil
|
||||
return caddyfileHeader + "\n" + caddyfile, nil
|
||||
}
|
||||
|
||||
func (g *CaddyfileGenerator) generateBaseFromPorts(containers []api.ServiceContainer) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user