Skip to content

How to know which route is a middlewareFunc registered to? #2335

Answered by aldas
JobberRT asked this question in Q&A
Discussion options

You must be logged in to vote

v4.10.0 #2337 added callback so you can create own global route registry

	e := echo.New()
	e.OnAddRouteHandler = func(host string, route echo.Route, handler echo.HandlerFunc, middleware []echo.MiddlewareFunc) {
		// add this info to your own "registry"
	}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@JobberRT
Comment options

@aldas
Comment options

@aldas
Comment options

Answer selected by JobberRT
@JobberRT
Comment options

@sokool
Comment options

@aldas
Comment options

@JobberRT
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants