Fix REQUEST_URL to reflect host and port of a client (#580)

Fixes: #578
This commit is contained in:
Denis Makogon
2017-03-14 22:55:56 +02:00
committed by Travis Reeder
parent 45831bcd26
commit 6a8b995e04

View File

@@ -164,7 +164,11 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, foun
envVars := map[string]string{
"METHOD": c.Request.Method,
"ROUTE": found.Path,
"REQUEST_URL": c.Request.URL.String(),
"REQUEST_URL": fmt.Sprintf("%v//%v%v", func() string {
if c.Request.TLS == nil {
return "http"
}
return "https"}(), c.Request.Host, c.Request.URL.String()),
}
// app config