middleware

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package middleware provides middleware functionality not provided by other packages. Wherever practical, these are for http.Handler; however, echo.MiddlewareFunc is used when error-handling is needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireContentTypes

func RequireContentTypes(contentTypes ...string) echo.MiddlewareFunc

RequireContentTypes returns an echo.MiddlewareFunc which validates the request content type is compatible with the contentTypes list. It writes a HTTP 415 error if that fails.

Only PUT, POST, and PATCH requests are considered.

func SetCOEP

func SetCOEP(policy string) func(http.Handler) http.Handler

func SetCORP

func SetCORP(policy string) func(http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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