package serverconfig

import (
	"net/http"

	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
)

func setRouteMiddleware(e *echo.Echo) {
	middlewareConfig := middleware.DefaultTrailingSlashConfig
	middlewareConfig.RedirectCode = http.StatusPermanentRedirect

	e.Use(middleware.AddTrailingSlashWithConfig(middlewareConfig))
}
