web

package
v0.0.0-...-d062592 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LdapServer            string
	LdapPort              = 389
	LdapSecurityLevel     = 4
	LdapBaseDN            string
	LdapGroup             string
	AUTH_MODE             string
	LISTEN_ADDR           string = "0.0.0.0:8080"
	USERNAME_HEADER       string = "X-username"
	SET_USERNAME_HEADER   bool
	InsecureSkipVerify    bool
	UPSTREAM_Bearer_TOKEN string
	EnableK8sDashbaord    bool
	K8sSaNameSpace        string = os.Getenv("K8S_SERVICE_ACCOUNT_NAME_SPACE")
)
View Source
var SSO authSource
View Source
var (
	UpStream string
)

Functions

func MustAuth

func MustAuth(handler func(w http.ResponseWriter, r *http.Request)) http.Handler

func NewProxy

func NewProxy(targetHost string) *httputil.ReverseProxy

func ProxyRequestHandler

func ProxyRequestHandler(proxy *httputil.ReverseProxy) func(http.ResponseWriter, *http.Request)

ProxyRequestHandler handles the http request using proxy

func Router

func Router()

func SetAuthSource

func SetAuthSource(source string) authSource

func SetInsecureSkipVerifyPolicy

func SetInsecureSkipVerifyPolicy()

Types

This section is empty.

Jump to

Keyboard shortcuts

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