added preloads page
This commit is contained in:
parent
b5ae5504a7
commit
333d5cb149
6 changed files with 235 additions and 75 deletions
|
|
@ -95,6 +95,15 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
fs.h.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
if option == "preloads" {
|
||||
h.Set(csp, indexCSP)
|
||||
err = preloads.Execute(w, getPreloads(p, fs.fs))
|
||||
if err != nil {
|
||||
fs.log.Error(err, "error rendering preloads")
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
i := &responseInterceptor{w: w}
|
||||
r.Header.Del("If-Modified-Since")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue