mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 13:22:09 +08:00
Fix the redirection code issue
This commit is contained in:
parent
c4580944ae
commit
1a3232a26b
@ -973,7 +973,7 @@ func (c *Context) String(code int, format string, values ...any) {
|
||||
|
||||
// Redirect returns an HTTP redirect to the specific location.
|
||||
func (c *Context) Redirect(code int, location string) {
|
||||
c.Render(-1, render.Redirect{
|
||||
c.Render(code, render.Redirect{
|
||||
Code: code,
|
||||
Location: location,
|
||||
Request: c.Request,
|
||||
|
Loading…
x
Reference in New Issue
Block a user