View definition

(Engine).RedirectTrailingSlash

Defined in github.com/gin-gonic/gin/gin.go

Description

Enables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists. For example if /foo/ is requested but a route only exists for /foo, the client is redirected to /foo with http status code 301 for GET requests and 307 for all other request methods.

RedirectTrailingSlash is referenced in 4 repositories

github.com/gin-gonic/gin github.com/g8os/stor github.com/housinganywhere/ha

...