middleware

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package middleware contains HTTP middleware that is specific to Emissary. These functions wrap regular HTTP handlers, and are used to mix in additional functionality into multiple handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowCSR

func AllowCSR(next echo.HandlerFunc) echo.HandlerFunc

AllowCSR allows "same-site" authentication cookies to work on Cross-Site Requests for specific GET routes. It returns an empty HTML page that refreshes to the same URL. Since this second request is now coming from the same site, cookies will be passed through on the second request.

func Authenticated added in v0.6.0

func Authenticated(next echo.HandlerFunc) echo.HandlerFunc

Authenticated middleware guarantees that the request is being performed by a website owner

func CacheControl

func CacheControl(cacheControl string) echo.MiddlewareFunc

func Domain

func Domain(factory *server.Factory) echo.MiddlewareFunc

Domain middleware validates that the requested domain has been fully activated before allowing the request to pass through.

func HttpsRedirect

func HttpsRedirect(handler echo.HandlerFunc) echo.HandlerFunc

func Localhost

func Localhost() echo.MiddlewareFunc

Localhost is a middleware that guarantees that requests are coming from localhost.

func MimeType

func MimeType(mimeType string) echo.MiddlewareFunc

MimeType generates an echo.Middleware function that forces the "Accept:" header to match a particular mime type. This is useful for switching the KIND of data returned by the server, based on URL, or Accept headers.

func Owner

func Owner(next echo.HandlerFunc) echo.HandlerFunc

Owner middleware guarantees that the request is being performed by a website owner

Types

This section is empty.

Jump to

Keyboard shortcuts

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