View definition

func NewVHostPathRewriter

Defined in


NewVHostPathRewriter returns path rewriter, which strips slashesCount leading slashes from the path and prepends the path with request's host, thus simplifying virtual hosting for static files.


*, slashesCount=0, original path="/foo/bar".
  Resulting path: "/"

*, slashesCount=1, original path="/images/123/456.jpg"
  Resulting path: "/"

NewVHostPathRewriter is referenced in 1 repository