Documentation ¶
Overview ¶
fileserver enable the user to modify the path of a file request before serving the actual file.
This packages uses otto (from https://github.com/robertkrimen/otto) to enable the dynamic nature of the filter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { sync.RWMutex // Rules holds the code used to match the requests Rules *otto.Otto // Base is the base dir used to search for files Base string // Fallback is called if the Rules don't return // a valid path Fallback http.Handler }
Handler implements the net/http.Handler interface and uses a javascript program to select which file should be loaded for a given request
Click to show internal directories.
Click to hide internal directories.