This commit is contained in:
Zeev Diukman 2024-08-22 07:52:59 +03:00
parent 950048dd59
commit 62de8c6436

View file

@ -15,7 +15,7 @@ func init() {
fmt.Println("ZPROX started")
}
func handler1(w http.ResponseWriter, r *http.Request) {
if r.Host == "test.diukman.com" {
if r.Host == "test.gotest.com" {
w.Write([]byte("H1"))
}
}
@ -25,7 +25,7 @@ func main() {
router.Handle("/", http.HandlerFunc(handler1))
srv := &http.Server{
Addr: ":8080",
Addr: ":80",
Handler: router,
}
@ -51,7 +51,7 @@ func main() {
defer cancel()
// Shutdown server
log.Println("Shutting down server...")
log.Println("\nShutting down server...")
if err := srv.Shutdown(ctx); err != nil {
log.Fatalf("Server forced to shutdown: %v\n", err)
}