mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00: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.
|
// 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
|
return s, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user