Moved fileServer and browse.IndexPages into middleware package

This commit is contained in:
Matthew Holt
2015-09-19 20:34:23 -06:00
parent 540a651fdf
commit 10ab037833
5 changed files with 33 additions and 20 deletions

View File

@ -20,7 +20,7 @@ type virtualHost struct {
// on its config. This method should be called last before
// ListenAndServe begins.
func (vh *virtualHost) buildStack() error {
vh.fileServer = FileServer(http.Dir(vh.config.Root), []string{vh.config.ConfigFile})
vh.fileServer = middleware.FileServer(http.Dir(vh.config.Root), []string{vh.config.ConfigFile})
// TODO: We only compile middleware for the "/" scope.
// Partial support for multiple location contexts already