route

package
v2.50.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableWriteMiddleware added in v2.22.1

func DisableWriteMiddleware(cfgProvider *config.ConfigProviderWithRefresh) echo.MiddlewareFunc

func PublicPath

func PublicPath(path string) echo.MiddlewareFunc

PublicPath returns middleware that strips publicPath from the start of the request URL so downstream routes (registered without the prefix) can match.

The regex is start-anchored (^) deliberately. echo's string-rule Rewrite translates path+"/*" into "<path>/(.*?)$" — end-anchored but NOT start-anchored — which causes any URL with publicPath as a substring past position 0 (e.g. /foo/custom/bar, or asset chunks whose hashed names happen to contain the literal "/custom/") to be silently rewritten to just the suffix. Building the regex explicitly forces start-position matching.

func SetAPIRoutes

func SetAPIRoutes(e *echo.Echo, cfgProvider *config.ConfigProviderWithRefresh, apiMiddleware []api.Middleware) error

SetAPIRoutes sets api routes

func SetAuthRoutes

func SetAuthRoutes(e *echo.Echo, cfgProvider *config.ConfigProviderWithRefresh)

SetAuthRoutes sets routes used by auth

func SetHealthRoute

func SetHealthRoute(e *echo.Echo)

func SetRenderRoute added in v2.32.0

func SetRenderRoute(e *echo.Echo, publicPath string)

func SetUIRoutes

func SetUIRoutes(e *echo.Echo, publicPath string, assets fs.FS) error

SetUIRoutes sets UI routes

Types

type Nonce

type Nonce struct {
	Nonce     string `json:"nonce"`
	ReturnURL string `json:"return_url"`
}

Jump to

Keyboard shortcuts

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