middleware

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package middleware provides a standard set of middleware for pomerium.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireBasicAuth added in v0.14.0

func RequireBasicAuth(username, password string) func(next http.Handler) http.Handler

RequireBasicAuth creates a new handler that requires basic auth from the client before calling the underlying handler.

func SetHeaders

func SetHeaders(headers map[string]string) func(next http.Handler) http.Handler

SetHeaders sets a map of response headers.

func StripCookie added in v0.4.0

func StripCookie(cookieName string) func(next http.Handler) http.Handler

StripCookie strips the cookie from the downstram request.

func TimeoutHandlerFunc added in v0.4.0

func TimeoutHandlerFunc(timeout time.Duration, timeoutError string) func(next http.Handler) http.Handler

TimeoutHandlerFunc wraps http.TimeoutHandler

func ValidateRequestURL added in v0.5.1

func ValidateRequestURL(r *http.Request, key []byte) error

ValidateRequestURL validates the current absolute request URL was signed by a given shared key.

func ValidateSignature

func ValidateSignature(sharedKey []byte) func(next http.Handler) http.Handler

ValidateSignature ensures the request is valid and has been signed with the correspdoning client secret key

Types

This section is empty.

Directories

Path Synopsis
Package responsewriter contains helper functions that useful for hooking into various parts of a response.
Package responsewriter contains helper functions that useful for hooking into various parts of a response.

Jump to

Keyboard shortcuts

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