proxy

package
Version: v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package proxy is a pomerium service that provides reverse proxying of internal routes. The proxy packages interoperates with other pomerium services over RPC in order to make access control decisions about a given incoming request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateOptions added in v0.0.5

func ValidateOptions(o *config.Options) error

ValidateOptions checks that proper configuration settings are set to create a proper Proxy instance

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy stores all the information associated with proxying a request.

func New added in v0.0.2

func New(cfg *config.Config) (*Proxy, error)

New takes a Proxy service from options and a validation function. Function returns an error if options fail to validate.

func (*Proxy) Callback added in v0.5.0

func (p *Proxy) Callback(w http.ResponseWriter, r *http.Request) error

Callback handles the result of a successful call to the authenticate service and is responsible setting per-route sessions.

func (*Proxy) Mount added in v0.18.0

func (p *Proxy) Mount(r *mux.Router)

Mount mounts the http handler to a mux router.

func (*Proxy) OnConfigChange added in v0.11.0

func (p *Proxy) OnConfigChange(ctx context.Context, cfg *config.Config)

OnConfigChange updates internal structures based on config.Options

func (*Proxy) ProgrammaticLogin added in v0.5.0

func (p *Proxy) ProgrammaticLogin(w http.ResponseWriter, r *http.Request) error

ProgrammaticLogin returns a signed url that can be used to login using the authenticate service.

func (*Proxy) RobotsTxt

func (p *Proxy) RobotsTxt(w http.ResponseWriter, _ *http.Request)

RobotsTxt sets the User-Agent header in the response to be "Disallow"

func (*Proxy) ServeHTTP added in v0.6.0

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Proxy) SignOut

func (p *Proxy) SignOut(w http.ResponseWriter, r *http.Request) error

SignOut clears the local session and redirects the request to the sign out url. It's the responsibility of the authenticate service to revoke the remote session and clear the authenticate service's session state.

Jump to

Keyboard shortcuts

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