You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//necessary bits and pieces for being able to serve e.g. the custom notification html
2
+
// without needing to create files in the users folders
3
+
package customfilesystem
4
+
5
+
import (
6
+
"bytes"
7
+
"errors"
8
+
"io/fs"
9
+
"net/http"
10
+
"path/filepath"
11
+
)
12
+
13
+
varDirectoryListingDisabledPage= []byte("<!DOCTYPE html><html><body><img src=\"https://raw.githubusercontent.com/loophole/website/master/static/img/logo.png\" alt=\"https://raw.githubusercontent.com/loophole/website/master/static/img/logo.png\" class=\"transparent shrinkToFit\" width=\"400\" height=\"88\"><p>Directory index listing has been disabled. Please enter the path of a file.</p></body></html>")
14
+
15
+
typeCustomFileSystemstruct {
16
+
FS http.FileSystem
17
+
}
18
+
19
+
//the file cannot be reused since it's io.Reader can only be read from once,
0 commit comments