infopage

package
v1.26.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GobisHeaderPrefix = "x-gobis-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InfoPage

type InfoPage struct{}

func NewInfoPage

func NewInfoPage() *InfoPage

func (InfoPage) Handler

func (InfoPage) Handler(proxyRoute gobis.ProxyRoute, params interface{}, next http.Handler) (http.Handler, error)

func (InfoPage) Schema

func (InfoPage) Schema() interface{}

type InfoPageConfig

type InfoPageConfig struct {
	InfoPage *InfoPageOptions `mapstructure:"info_page" json:"info_page" yaml:"info_page"`
}

type InfoPageOptions

type InfoPageOptions struct {
	// enable info page middleware
	Enabled bool `mapstructure:"enabled" json:"enabled" yaml:"enabled"`
	// Path where the info page will be available (Default: "/gobis_info")
	// Be careful it will override any existing path with this name on upstream
	Path string `mapstructure:"path" json:"path" yaml:"path"`
	// Show in the info page the authorization header set in request
	// This permit to see, for example, token created by oauth2 middleware
	// (every handler use for login should write in Authorization token/string used to connect)
	ShowAuthorizationHeader bool `mapstructure:"show_authorization_header" json:"show_authorization_header" yaml:"show_authorization_header"`
	// Name of the key for authorization header to use in info page (Default: authorization)
	// ShowAuthorizationHeader must be true to set this value
	AuthorizationKeyName string `mapstructure:"authorization_key_name" json:"authorization_key_name" yaml:"authorization_key_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL