mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-24 12:08:19 +02:00
proxy: make http redirect server configurable (#105)
This commit is contained in:
parent
286aad3b92
commit
25d76cd5c0
4 changed files with 37 additions and 10 deletions
|
@ -2,6 +2,11 @@ package urlutil // import "github.com/pomerium/pomerium/internal/urlutil"
|
|||
|
||||
import "strings"
|
||||
|
||||
// StripPort returns a host, without any port number.
|
||||
//
|
||||
// If Host is an IPv6 literal with a port number, Hostname returns the
|
||||
// IPv6 literal without the square brackets. IPv6 literals may include
|
||||
// a zone identifier.
|
||||
func StripPort(hostport string) string {
|
||||
colon := strings.IndexByte(hostport, ':')
|
||||
if colon == -1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue