mirror of
https://github.com/golang/go
synced 2024-11-05 16:56:16 -07:00
godoc: use dl.google.com instead of redirector.gvt1.com
Fixes golang/go#22648 Change-Id: I59185cc1ed61235a0fcfadc060c4735372586358 Reviewed-on: https://go-review.googlesource.com/76971 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
bce7a99f8a
commit
9c477bae19
@ -35,9 +35,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
edgeCacheBaseURL = "https://redirector.gvt1.com/edgedl/go/"
|
||||
cacheKey = "download_list_3" // increment if listTemplateData changes
|
||||
cacheDuration = time.Hour
|
||||
downloadBaseURL = "https://dl.google.com/go/"
|
||||
cacheKey = "download_list_3" // increment if listTemplateData changes
|
||||
cacheDuration = time.Hour
|
||||
)
|
||||
|
||||
func RegisterHandlers(mux *http.ServeMux) {
|
||||
@ -133,7 +133,7 @@ func (f File) Highlight() bool {
|
||||
}
|
||||
|
||||
func (f File) URL() string {
|
||||
return edgeCacheBaseURL + f.Filename
|
||||
return downloadBaseURL + f.Filename
|
||||
}
|
||||
|
||||
type Release struct {
|
||||
@ -424,7 +424,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
http.Redirect(w, r, edgeCacheBaseURL+name, http.StatusFound)
|
||||
http.Redirect(w, r, downloadBaseURL+name, http.StatusFound)
|
||||
}
|
||||
|
||||
func validUser(user string) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user