middleware

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 7 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 Recovery added in v0.21.0

func Recovery(next http.Handler) http.Handler

Recovery is an HTTP middleware function that logs any panics.

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 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 corresponding 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