commit | 5303c5795f4ed11ea9be9b797121562cce821bab | [log] [tgz] |
---|---|---|
author | Julie Qiu <julie@golang.org> | Thu Feb 04 12:45:55 2021 -0500 |
committer | Julie Qiu <julie@golang.org> | Thu Feb 04 19:58:13 2021 +0000 |
tree | 568d0e4ecbc97cf5e98a88fa196fd35a4972c136 | |
parent | d0022eeb2bb2b720f62a52a715e05dda44d9ff13 [diff] |
gddo-server: change redirects to 301 Change-Id: Ie2c31f719a29d3cd2eb7b449bf9908fae875b168 Reviewed-on: https://go-review.googlesource.com/c/gddo/+/289730 Reviewed-by: Jamal Carvalho <jamal@golang.org> Trust: Julie Qiu <julie@golang.org>
diff --git a/gddo-server/pkgsite.go b/gddo-server/pkgsite.go index 52c477d..c623db8 100644 --- a/gddo-server/pkgsite.go +++ b/gddo-server/pkgsite.go
@@ -199,7 +199,7 @@ redirectURL := pkgGoDevURL(r.URL).String() if configPoller != nil { if shouldRedirectURL(r, configPoller) { - http.Redirect(w, r, redirectURL, http.StatusFound) + http.Redirect(w, r, redirectURL, http.StatusMovedPermanently) return nil } }