mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix REQUEST_URL to reflect host and port of a client (#580)
Fixes: #578
This commit is contained in:
committed by
Travis Reeder
parent
45831bcd26
commit
6a8b995e04
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user