1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-03-26 20:15:48 -07:00
parent 0d23a63a96
commit 22012e0e9d
2 changed files with 2 additions and 2 deletions

View File

@ -519,7 +519,7 @@ func (c *context) NoContent(code int) error {
}
func (c *context) Redirect(code int, url string) error {
if code < http.StatusMultipleChoices || code > http.StatusTemporaryRedirect {
if code < 300 || code > 308 {
return ErrInvalidRedirectCode
}
c.response.Header().Set(HeaderLocation, url)

View File

@ -39,7 +39,7 @@ e.Use(middleware.AddTrailingSlashWithConfig(middleware.TrailingSlashConfig{
}))
```
Example above will add a trailing slash to the request URI and redirect with `308 - StatusMovedPermanently`.
Example above will add a trailing slash to the request URI and redirect with `301 - StatusMovedPermanently`.
## Configuration