Skip to content
Permalink
Browse files

Merge pull request #302 from erbesharat/fix/lowercase-host

[prometheus]: Lowercase host value for metrics
  • Loading branch information
stp-ip committed Dec 1, 2019
2 parents e8632aa + a664146 commit d9def1099fe99f8777ad7fd5f058cb3f6c02a5d5
Showing with 2 additions and 0 deletions.
  1. +2 −0 setup.go
@@ -19,6 +19,7 @@ import (
"log"
"net/http"
"os"
"strings"

lumberjack "gopkg.in/natefinch/lumberjack.v2"

@@ -205,6 +206,7 @@ type TXTDirect struct {
}

func (rd TXTDirect) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
r.URL.Host = strings.ToLower(r.URL.Host)
if err := Redirect(w, r, rd.Config); err != nil {
if err.Error() == "option disabled" {
return rd.Next.ServeHTTP(w, r)

0 comments on commit d9def10

Please sign in to comment.
You can’t perform that action at this time.