307 is better than 301

The browser will cache 301
This commit is contained in:
qclaogui 2017-11-13 04:01:11 -06:00 committed by GitHub
parent ae9f03e6e8
commit e43ed325bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -984,7 +984,7 @@ Issuing a HTTP redirect is easy:
```go
r.GET("/test", func(c *gin.Context) {
c.Redirect(http.StatusMovedPermanently, "http://www.google.com/")
c.Redirect(http.StatusTemporaryRedirect, "http://www.google.com/")
})
```
Both internal and external locations are supported.