Merge f5dc62a82b
into 0b0ce031ac
This commit is contained in:
commit
4c65a2c3ad
3 changed files with 15 additions and 2 deletions
|
@ -175,6 +175,7 @@ The following table shows a configuration option's name, type, and the default v
|
|||
|[otel-sampler-ratio](#otel-sampler-ratio)|float|0.01||
|
||||
|[main-snippet](#main-snippet)|string|""||
|
||||
|[http-snippet](#http-snippet)|string|""||
|
||||
|[default-server-snippet](#default-server-snippet)|string|""||
|
||||
|[server-snippet](#server-snippet)|string|""||
|
||||
|[stream-snippet](#stream-snippet)|string|""||
|
||||
|[location-snippet](#location-snippet)|string|""||
|
||||
|
@ -1102,6 +1103,10 @@ Adds custom configuration to the main section of the nginx configuration.
|
|||
|
||||
Adds custom configuration to the http section of the nginx configuration.
|
||||
|
||||
## default-server-snippet
|
||||
|
||||
Adds custom configuration to the default server in the nginx configuration.
|
||||
|
||||
## server-snippet
|
||||
|
||||
Adds custom configuration to all the servers in the nginx configuration.
|
||||
|
|
|
@ -733,6 +733,9 @@ type Configuration struct {
|
|||
// HTTPSnippet adds custom configuration to the http section of the nginx configuration
|
||||
HTTPSnippet string `json:"http-snippet"`
|
||||
|
||||
// DefaultServerSnippet adds custom configuration to the default server in the nginx configuration
|
||||
DefaultServerSnippet string `json:"default-server-snippet"`
|
||||
|
||||
// ServerSnippet adds custom configuration to all the servers in the nginx configuration
|
||||
ServerSnippet string `json:"server-snippet"`
|
||||
|
||||
|
|
|
@ -732,6 +732,11 @@ http {
|
|||
{{ if $cfg.EnableOpentelemetry }}
|
||||
opentelemetry off;
|
||||
{{ end }}
|
||||
|
||||
{{ if not (empty $cfg.DefaultServerSnippet) }}
|
||||
# Custom code snippet configured for default server
|
||||
{{ $cfg.DefaultServerSnippet }}
|
||||
{{ end }}
|
||||
location {{ $healthzURI }} {
|
||||
return 200;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue