Listen on 127.0.0.1

This commit is contained in:
Senad Uka
2022-02-14 20:00:15 +01:00
parent a9441672ae
commit aed3ba0dc1

View File

@@ -13,7 +13,7 @@ func main() {
srv := &http.Server{
Handler: r,
Addr: ":8080",
Addr: "127.0.0.1:8080",
// Good practice: enforce timeouts for servers you create!
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,