docs and simplify

This commit is contained in:
Henrique Dias
2016-02-14 10:20:47 +00:00
parent 4a6c53a12b
commit 2414f2edec
5 changed files with 10 additions and 9 deletions

View File

@@ -8,9 +8,9 @@ import (
"github.com/hacdias/caddy-hugo/config"
)
// ServeHTTP is used to serve the content of Browse page
// using Browse middleware from Caddy. It handles the requests
// for DELETE, POST, GET and PUT related to /browse interface.
// ServeHTTP is used to serve the content of Browse page using Browse middleware
// from Caddy. It handles the requests for DELETE, POST, GET and PUT related to
// /browse interface.
func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error) {
// Removes the page main path from the URL
r.URL.Path = strings.Replace(r.URL.Path, "/admin/browse", "", 1)