Documentation
¶
Index ¶
- func DisableWriteMiddleware(cfgProvider *config.ConfigProviderWithRefresh) echo.MiddlewareFunc
- func PublicPath(path string) echo.MiddlewareFunc
- func SetAPIRoutes(e *echo.Echo, cfgProvider *config.ConfigProviderWithRefresh, ...) error
- func SetAuthRoutes(e *echo.Echo, cfgProvider *config.ConfigProviderWithRefresh)
- func SetHealthRoute(e *echo.Echo)
- func SetRenderRoute(e *echo.Echo, publicPath string)
- func SetUIRoutes(e *echo.Echo, publicPath string, assets fs.FS) error
- type Nonce
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 SetRenderRoute ¶ added in v2.32.0
Types ¶
Click to show internal directories.
Click to hide internal directories.