Skip to content
Myr

Only allow local requests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 924ffb5 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/server.go+1 added-1 removed
22 unmodified lines
23 if port == 0 {24 return nil25 }2627 listener, err := net.Listen("tcp", fmt.Sprintf(":%d", port))27 listener, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", port))28 if err != nil {29 return fmt.Errorf("port not available: %d", port)30 }31
95 unmodified lines