diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-04-10 17:31:38 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-04-10 17:31:38 -0600 |
commit | a3bdc22234b75e9420f8810918072fa34732ffb7 (patch) | |
tree | 1b9fd4cc16f1770f5535a929266f2528022d7bc5 /listeners_test.go | |
parent | d3383ced2abb8dfb36e56fa9bbe3136a2a379281 (diff) |
admin: Always enforce Host header checks
With a simple heuristic for loopback addresses, we can enable this by
default without adding unnecessary inconvenience.
Diffstat (limited to 'listeners_test.go')
-rw-r--r-- | listeners_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/listeners_test.go b/listeners_test.go index 2828a3b..b75e2dc 100644 --- a/listeners_test.go +++ b/listeners_test.go @@ -139,6 +139,14 @@ func TestJoinNetworkAddress(t *testing.T) { expect: "unix//foo/bar", }, { + network: "unix", host: "/foo/bar", port: "0", + expect: "unix//foo/bar", + }, + { + network: "unix", host: "/foo/bar", port: "1234", + expect: "unix//foo/bar", + }, + { network: "", host: "::1", port: "1234", expect: "[::1]:1234", }, |