Created
May 10, 2021 15:05
-
-
Save LautaroJayat/d8b8b7be70f64d372d2bd4767c0672e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package director | |
import ( | |
"net/http" | |
"os" | |
) | |
func NewDirector() func(req *http.Request){ | |
host:= os.Getenv("HOST") | |
scheme:= os.Getenv("SCHEME") | |
return func(req *http.Request){ | |
req.URL.Host = host | |
req.URL.Scheme = scheme | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment