fix: Use the correct domain for metrics
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
315bb39f44
commit
8630855374
@ -63,15 +63,10 @@ func handleSubdomain(ctx *context.GlobalContext, domain, cname, path string, req
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
d := domain
|
|
||||||
if cname != "" {
|
|
||||||
d = cname
|
|
||||||
}
|
|
||||||
|
|
||||||
c := &context.Context{
|
c := &context.Context{
|
||||||
Username: username,
|
Username: username,
|
||||||
Reponame: repo.Name,
|
Reponame: repo.Name,
|
||||||
Domain: d,
|
Domain: domain,
|
||||||
Path: path,
|
Path: path,
|
||||||
Referrer: req.Header.Get("Referer"),
|
Referrer: req.Header.Get("Referer"),
|
||||||
UserAgent: req.Header.Get("User-Agent"),
|
UserAgent: req.Header.Get("User-Agent"),
|
||||||
@ -288,7 +283,7 @@ func runServer(ctx *cli.Context) error {
|
|||||||
go func() {
|
go func() {
|
||||||
defer waitGroup.Done()
|
defer waitGroup.Done()
|
||||||
|
|
||||||
log.Debug("Listening on main HTTP server")
|
log.Infof("Listening on main HTTP server %s", httpAddr)
|
||||||
if err := http.Serve(listener, Handler(globalCtx)); err != nil {
|
if err := http.Serve(listener, Handler(globalCtx)); err != nil {
|
||||||
log.Fatal(fmt.Errorf("Listening failed: %v", err))
|
log.Fatal(fmt.Errorf("Listening failed: %v", err))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user