middleware

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckParameter added in v0.55.0

func CheckParameter(svc project.Service, apiPrefix string) echo.MiddlewareFunc

CheckParameter is a middleware that will verify if the project used for the request exists. It will also check if the project name and the resource name are valid. This is required to prevent any path traversal attack. apiPrefix is the optional prefix configured by the user (config `api_prefix`) under which every route is registered.

func Decompress added in v0.55.0

func Decompress() echo.MiddlewareFunc

Decompress decompresses the gzip request bodies like the echo Decompress middleware does. The echo middleware only replaces the body: the headers Content-Encoding and Content-Length still describe the compressed body. A request forwarded as is (e.g. by the datasource proxy) would then be inconsistent and rejected. Once the body is decompressed, these headers are removed, and the length of the body becomes unknown.

func HandleAPIPrefix added in v0.47.1

func HandleAPIPrefix(apiPrefix string) echo.MiddlewareFunc

func HandleAnonymous added in v0.52.0

func HandleAnonymous(isAnonymous bool) echo.MiddlewareFunc

func HandleError added in v0.25.0

func HandleError() echo.MiddlewareFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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