Disable cache for directory listings
This commit is contained in:
parent
d6035aa01b
commit
e1abbb6f33
|
@ -51,6 +51,10 @@ func mapDirOpenError(originalErr error, name string) error {
|
|||
|
||||
func dirList(w http.ResponseWriter, r *http.Request, f http.File) {
|
||||
tableheader := ""
|
||||
// Disable cache for directory indexes
|
||||
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
|
||||
dirs, err := f.Readdir(-1)
|
||||
if err != nil {
|
||||
logf(r, "http: error reading directory: %v", err)
|
||||
|
|
Loading…
Reference in New Issue