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 ¶
- func AllowCSR(next echo.HandlerFunc) echo.HandlerFunc
- func Authenticated(next echo.HandlerFunc) echo.HandlerFunc
- func CacheControl(cacheControl string) echo.MiddlewareFunc
- func Domain(factory *server.Factory) echo.MiddlewareFunc
- func HttpsRedirect(handler echo.HandlerFunc) echo.HandlerFunc
- func Localhost() echo.MiddlewareFunc
- func MimeType(mimeType string) echo.MiddlewareFunc
- func Owner(next echo.HandlerFunc) echo.HandlerFunc
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 ¶
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.
Types ¶
This section is empty.