ContainerImage.Pinniped/internal/httputil/requestutil/requestutil.go

15 lines
272 B
Go
Raw Permalink Normal View History

// Copyright 2023 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package requestutil
import "net/http"
func SNIServerName(req *http.Request) string {
name := ""
if req.TLS != nil {
name = req.TLS.ServerName
}
return name
}