Versions in this module Expand all Collapse all v1 v1.1.0 Apr 8, 2024 Changes in this version + var ErrInvalidParameter = errors.New("invalid parameter") + func OrigRemoteAddrFromCtx(ctx context.Context) (string, bool) + func ParseSingleIPTemplate(ipTmpl string) (string, error) + func TLSConfig(l *ListenerConfig, props map[string]string, ui cli.Ui) (*tls.Config, reloadutil.ReloadFunc, error) + func TrustedFromXForwardedFor(r *http.Request, l *ListenerConfig) (trustedAddress *Addr, remoteAddress *Addr, e error) + func UnixSocketListener(path string, unixSocketsConfig *UnixSocketsConfig) (net.Listener, error) + func WrapCustomHeadersHandler(h http.Handler, config *ListenerConfig, isUiRequest uiRequestFunc) http.Handler + func WrapForwardedForHandler(h http.Handler, l *ListenerConfig, respErrFn ErrResponseFn) (http.Handler, error) + type Addr struct + Host string + Port string + type ErrResponseFn func(w http.ResponseWriter, status int, err error) + type Listener struct + Config ListenerConfig + type ListenerConfig struct + Address string + ClusterAddress string + CorsAllowedHeaders []string + CorsAllowedHeadersRaw []string + CorsAllowedOrigins []string + CorsDisableDefaultAllowedOriginValues *bool + CorsDisableDefaultAllowedOriginValuesRaw interface{} + CorsEnabled *bool + CorsEnabledRaw interface{} + CustomApiResponseHeaders map[int]http.Header + CustomApiResponseHeadersRaw interface{} + CustomUiResponseHeaders map[int]http.Header + CustomUiResponseHeadersRaw interface{} + HTTPIdleTimeout time.Duration + HTTPIdleTimeoutRaw interface{} + HTTPReadHeaderTimeout time.Duration + HTTPReadHeaderTimeoutRaw interface{} + HTTPReadTimeout time.Duration + HTTPReadTimeoutRaw interface{} + HTTPWriteTimeout time.Duration + HTTPWriteTimeoutRaw interface{} + MaxRequestDuration time.Duration + MaxRequestDurationRaw interface{} + MaxRequestSize int64 + MaxRequestSizeRaw interface{} + ProxyProtocolAuthorizedAddrs []*sockaddr.SockAddrMarshaler + ProxyProtocolAuthorizedAddrsRaw interface{} + ProxyProtocolBehavior string + Purpose []string + PurposeRaw interface{} + RandomPort bool + RawConfig map[string]interface{} + RequireRequestHeader bool + RequireRequestHeaderRaw interface{} + SocketGroup string + SocketMode string + SocketUser string + TLSCertFile string + TLSCipherSuites []uint16 + TLSCipherSuitesRaw string + TLSClientCAFile string + TLSDisable bool + TLSDisableClientCerts bool + TLSDisableClientCertsRaw interface{} + TLSDisableRaw interface{} + TLSKeyFile string + TLSMaxVersion string + TLSMinVersion string + TLSPreferServerCipherSuites bool + TLSPreferServerCipherSuitesRaw interface{} + TLSRequireAndVerifyClientCert bool + TLSRequireAndVerifyClientCertRaw interface{} + Telemetry ListenerTelemetry + Type string + XForwardedForAuthorizedAddrs []*sockaddr.SockAddrMarshaler + XForwardedForAuthorizedAddrsRaw interface{} + XForwardedForHopSkips int64 + XForwardedForHopSkipsRaw interface{} + XForwardedForRejectNotAuthorized bool + XForwardedForRejectNotAuthorizedRaw interface{} + XForwardedForRejectNotPresent bool + XForwardedForRejectNotPresentRaw interface{} + func ParseListeners(list *ast.ObjectList, opt ...Option) ([]*ListenerConfig, error) + func (l *ListenerConfig) GoString() string + type ListenerTelemetry struct + UnauthenticatedMetricsAccess bool + UnauthenticatedMetricsAccessRaw interface{} + type Option func(*options) error + func WithDefaultUiContentSecurityPolicyHeader(cspHeader string) Option + type ResponseWriter struct + func (w *ResponseWriter) Flush() + func (w *ResponseWriter) Header() http.Header + func (w *ResponseWriter) Push(target string, opts *http.PushOptions) error + func (w *ResponseWriter) Unwrap() http.ResponseWriter + func (w *ResponseWriter) Write(data []byte) (int, error) + func (w *ResponseWriter) WriteHeader(statusCode int) + type UnixSocketsConfig struct + Group string + Mode string + User string v1.1.0-development20240408 Apr 8, 2024