[release-branch.go1.2] go.tools/blog: strip prefix when serving static content
««« CL 22700043 / 8cdf69ad05e9 go.tools/blog: strip prefix when serving static content This fix permits godoc to serve images correctly under /blog/. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/22700043 »»» R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/23400043
This commit is contained in:
parent
72b8aac9ec
commit
161de53d86
|
@ -118,7 +118,7 @@ func NewServer(cfg Config) (*Server, error) {
|
|||
}
|
||||
|
||||
// Set up content file server.
|
||||
s.content = http.FileServer(http.Dir(cfg.ContentPath))
|
||||
s.content = http.StripPrefix(s.cfg.BasePath, http.FileServer(http.Dir(cfg.ContentPath)))
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue