go /
gddo /
17b648fae2959f9d9b49c82b70fd4f6e35a1b27f gddo-server: redirect invalid import paths to homepage
When a URL path for a package page fails the check for
module.CheckImportPath, redirect to the homepage. Otherwise, the page
will 400 on pkg.go.dev.
Change-Id: Ic337b968a3919b2e4fcd0ab4dd6b76c631f5edf9
Reviewed-on: https://go-review.googlesource.com/c/gddo/+/279035
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2 files changed