mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 13:56:57 +00:00
Add host to handler logging
- Add the host to the Handler's logging fields, so you don't just see the path, but also which domain was being requested.
This commit is contained in:
parent
392c6ae452
commit
c0e1e683fa
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ func Handler(mainDomainSuffix, rawDomain []byte,
|
|||
dnsLookupCache, canonicalDomainCache, branchTimestampCache, fileResponseCache cache.SetGetKey,
|
||||
) func(ctx *fasthttp.RequestCtx) {
|
||||
return func(ctx *fasthttp.RequestCtx) {
|
||||
log := log.With().Str("Handler", string(ctx.Request.Header.RequestURI())).Logger()
|
||||
log := log.With().Strs("Handler", []string{string(ctx.Request.Host()), string(ctx.Request.Header.RequestURI())}).Logger()
|
||||
|
||||
ctx.Response.Header.Set("Server", "CodebergPages/"+version.Version)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue