Rewrite returns a Rewrite middleware. Rewrite middleware rewrites the URL path based on the provided rules.
(rules map[string]string)
| 38 | // |
| 39 | // Rewrite middleware rewrites the URL path based on the provided rules. |
| 40 | func Rewrite(rules map[string]string) echo.MiddlewareFunc { |
| 41 | c := RewriteConfig{} |
| 42 | c.Rules = rules |
| 43 | return RewriteWithConfig(c) |
| 44 | } |
| 45 | |
| 46 | // RewriteWithConfig returns a Rewrite middleware or panics on invalid configuration. |
| 47 | // |
nothing calls this directly
no test coverage detected
searching dependent graphs…