Skip to content

Instantly share code, notes, and snippets.

@LautaroJayat
Created May 10, 2021 15:05
Show Gist options
  • Save LautaroJayat/d8b8b7be70f64d372d2bd4767c0672e3 to your computer and use it in GitHub Desktop.
Save LautaroJayat/d8b8b7be70f64d372d2bd4767c0672e3 to your computer and use it in GitHub Desktop.
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