Skip to content

Commit 3ef209b

Browse files
committed
Allow remote connections
1 parent 649485b commit 3ef209b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ func main() {
4848

4949
srv := &http.Server{
5050
Handler: router,
51-
Addr: "127.0.0.1:9000",
51+
// 127.0.0.1:9000 restricts the server to local connections
52+
// Use :9000 to allow remote connections
53+
Addr: ":9000",
5254
// Good practice to set timeouts to mitigate Slowloris attacks
5355
WriteTimeout: 15 * time.Second,
5456
ReadTimeout: 15 * time.Second,

0 commit comments

Comments
 (0)