mirror of
https://github.com/golang/go
synced 2024-11-18 12:54:44 -07:00
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
This commit is contained in:
parent
e59751ce56
commit
50d9adec93
@ -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
Block a user