// SetRedirectTrailingSlash enables 307 redirects on urls ending with /
// when disabled, an URL ending with / will 404
// this will and should work only if using the default router
// DEPRECATED
SetRedirectTrailingSlash enables 307 redirects on urls ending with
when disabled, an URL ending with / will 404
this will and should work only if using the default router
DEPRECATED
// SetRedirectTrailingSlash enables 307 redirects on urls ending with / // when disabled an URL ending with / will 404 // this will and should work only if using the default router // DEPRECATED
func (api *API) SetRedirectTrailingSlash(enabled bool) {
	if api.router == nil {
		panic("router must not be nil")
	}
	httpRouter, ok := api.router.(*routing.HTTPRouter)
	if !ok {
		panic("can not set redirectTrailingSlashes if not using the internal httpRouter")
	}
	httpRouter.SetRedirectTrailingSlash(enabled)
}
func ( api * API ) SetRedirectTrailingSlash ( enabled bool ) { if api . router == nil { panic ( " " ) } httpRouter , ok := api . router . ( * routing . HTTPRouter ) if ! ok { panic ( " " ) } httpRouter . SetRedirectTrailingSlash ( enabled ) }
SetRedirectTrailingSlash enables 307 redirects on urls ending with
when disabled, an URL ending with / will 404
this will and should work only if using the default router
DEPRECATED
SetRedirectTrailingSlash enables 307 redirects on urls ending with when disabled an URL ending with / will 404 this will and should work only if using the default router DEPRECATED