Skip to content

Commit 80686cf

Browse files
committed
✨Expanded the generated HTTP server configuration block so future scaffolding keeps httpsPort, timeout, and TLS settings inline with user_server expectations
1 parent a63eac7 commit 80686cf

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cmd/sponge/commands/generate/template.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,19 @@ func NewCenter(configFile string) (*Center, error) {
370370
httpServerConfigCode = `# http server settings
371371
http:
372372
port: 8080 # listen port
373-
timeout: 0 # request timeout, unit(second), if 0 means not set, if greater than 0 means set timeout, if enableHTTPProfile is true, it needs to set 0 or greater than 60s`
373+
httpsPort: 8443 # https listen port when tls is enabled
374+
timeout: 0 # request timeout, unit(second), if 0 means not set, if greater than 0 means set timeout, if enableHTTPProfile is true, it needs to set 0 or greater than 60s
375+
idleTimeout: 60 # http idle timeout, unit(second)
376+
readTimeout: 30 # http read timeout, unit(second)
377+
writeTimeout: 30 # http write timeout, unit(second)
378+
tls:
379+
domains:
380+
- "" # list of domains for automatic tls certificates, empty disables tls
381+
acmeDirectory: "https://acme-v02.api.letsencrypt.org/directory" # acme directory url
382+
storagePath: "./storage/autocert" # directory to cache certificates
383+
eab:
384+
kid: "" # external account binding key identifier
385+
hmacKey: "" # base64url encoded external account binding hmac key`
374386

375387
rpcServerConfigCode = `# grpc server settings
376388
grpc:

0 commit comments

Comments
 (0)