Skip to content
Permalink
Browse files

fix: skip logger for ping

  • Loading branch information...
giuem committed Feb 9, 2019
1 parent e33170c commit 70e6650f87eb7a627872621d23404321f20128f0
Showing with 8 additions and 2 deletions.
  1. +1 −1 Dockerfile
  2. +7 −1 server/server.go
@@ -24,7 +24,7 @@ COPY --from=BUILD /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=BUILD /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=BUILD /src/ga-proxy /ga-proxy

HEALTHCHECK --interval=1m --timeout=10s --start-period=1s --retries=2 \
HEALTHCHECK --interval=3m --timeout=10s --start-period=2s --retries=3 \
CMD /ga-proxy ping

CMD ["/ga-proxy"]
@@ -11,7 +11,13 @@ func Run(ip, port string) {
addr := fmt.Sprintf("%v:%v", ip, port)

r := gin.New()
r.Use(gin.Logger())
logger := gin.Logger()
r.Use(func(c *gin.Context) {
if c.Request.URL.Path == "/ping" {
return
}
logger(c)
})

r.NoRoute(handleRedirect)
// version < 1

0 comments on commit 70e6650

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