mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-12 09:36:53 -05:00
fix: fix config
This commit is contained in:
parent
9f9d9c56cf
commit
b6966f4797
@ -69,6 +69,7 @@ func (ot *Tracing) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyh
|
|||||||
// UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax:
|
// UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax:
|
||||||
//
|
//
|
||||||
// tracing {
|
// tracing {
|
||||||
|
// [injectServerTimingHeader <bool>]
|
||||||
// [span <span_name>]
|
// [span <span_name>]
|
||||||
// }
|
// }
|
||||||
func (ot *Tracing) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
func (ot *Tracing) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
@ -95,6 +96,12 @@ func (ot *Tracing) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for d.NextBlock(0) {
|
for d.NextBlock(0) {
|
||||||
|
switch d.Val() {
|
||||||
|
case "injectServerTimingHeader":
|
||||||
|
if d.NextArg() {
|
||||||
|
ot.InjectServerTimingHeader = true
|
||||||
|
}
|
||||||
|
default:
|
||||||
if dst, ok := paramsMap[d.Val()]; ok {
|
if dst, ok := paramsMap[d.Val()]; ok {
|
||||||
if err := setParameter(d, dst); err != nil {
|
if err := setParameter(d, dst); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -103,6 +110,7 @@ func (ot *Tracing) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||||||
return d.ArgErr()
|
return d.ArgErr()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user