Created
May 10, 2021 13:38
-
-
Save LautaroJayat/1446bdd97b91016f942226b694c54942 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 main | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/httputil" | |
"os" | |
d "github.com/lautarojayat/auth_proxy/proxy/director" | |
rt "github.com/lautarojayat/auth_proxy/proxy/router" | |
) | |
var rp = httputil.ReverseProxy{ | |
Director: d.NewDirector(), | |
} | |
func main(){ | |
fmt.Printf("SCHEME %v\n", os.Getenv("SCHEME")) | |
fmt.Printf("HOST %v\n", os.Getenv("HOST")) | |
fmt.Printf("Auth %v\n", os.Getenv("AUTH")) | |
fmt.Println("Starting proxy server") | |
r := rt.NewRouter(&rp) | |
srv := http.Server{ | |
Handler: r, | |
Addr: "localhost:8081", | |
} | |
srv.ListenAndServe() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment