Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAuthHeaders ¶
AddAuthHeaders adds authentication headers to the request Deprecated: Use the Forwarder from pkg/forwarding for more flexible header management
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a reverse proxy handler
func NewHandler ¶
NewHandler creates a new proxy handler with a default upstream Deprecated: Use NewHandlerWithConfig instead
func NewHandlerWithConfig ¶
func NewHandlerWithConfig(upstreamConfig UpstreamConfig) (*Handler, error)
NewHandlerWithConfig creates a new proxy handler with upstream configuration
type SecretConfig ¶
type SecretConfig struct {
Header string `yaml:"header" json:"header"` // HTTP header name (e.g., "X-Chatbotgate-Secret")
Value string `yaml:"value" json:"value"` // Secret value to send
}
SecretConfig represents secret header configuration for upstream authentication
type UpstreamConfig ¶
type UpstreamConfig struct {
URL string `yaml:"url" json:"url"` // Upstream URL (required)
Secret SecretConfig `yaml:"secret" json:"secret"` // Secret header configuration (optional)
}
UpstreamConfig represents upstream server configuration with optional secret header
Click to show internal directories.
Click to hide internal directories.