update
parent
6b0a132161
commit
28ea0de82e
|
@ -7,6 +7,11 @@
|
||||||
<i class="material-icons" title="Edit">mode_edit</i>
|
<i class="material-icons" title="Edit">mode_edit</i>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<!-- {{ if .IsDir }}
|
||||||
|
<div class="action" id="info">
|
||||||
|
<i class="material-icons">info</i>
|
||||||
|
</div> -->
|
||||||
|
{{ end }}
|
||||||
<div class="action" id="download">
|
<div class="action" id="download">
|
||||||
<a href="?download=true">
|
<a href="?download=true">
|
||||||
<i class="material-icons" title="Download">file_download</i> <span>Download</span>
|
<i class="material-icons" title="Download">file_download</i> <span>Download</span>
|
||||||
|
|
|
@ -93,31 +93,23 @@
|
||||||
|
|
||||||
{{ if .IsDir }}
|
{{ if .IsDir }}
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div>
|
<div>
|
||||||
<div class="action" id="back">
|
<div class="action" id="back">
|
||||||
<i class="material-icons" title="Back">arrow_back</i>
|
<i class="material-icons" title="Back">arrow_back</i>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p><span id="selected-number">0</span> selected.</p>
|
||||||
<span id="selected-number">0</span>
|
</div>
|
||||||
selected.</p>
|
<div>
|
||||||
</div>
|
{{ template "actions" . }}
|
||||||
<div>
|
</div>
|
||||||
{{ template "actions" . }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
{{ template "content" . }}
|
||||||
{{ template "content" . }}
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> and <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
|
||||||
Served with
|
|
||||||
<a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a>
|
|
||||||
and
|
|
||||||
<a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- SCRIPTS -->
|
<!-- SCRIPTS -->
|
||||||
<!-- User Data and Permissions; WebDavURL -->
|
<!-- User Data and Permissions; WebDavURL -->
|
||||||
|
|
|
@ -43,10 +43,6 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||||
return f.Next.ServeHTTP(w, r)
|
return f.Next.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Set("x-frame-options", "SAMEORIGIN")
|
|
||||||
w.Header().Set("x-content-type", "nosniff")
|
|
||||||
w.Header().Set("x-xss-protection", "1; mode=block")
|
|
||||||
|
|
||||||
c = &f.Configs[i]
|
c = &f.Configs[i]
|
||||||
|
|
||||||
// Checks if the URL matches the Assets URL. Returns the asset if the
|
// Checks if the URL matches the Assets URL. Returns the asset if the
|
||||||
|
@ -96,6 +92,10 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w.Header().Set("x-frame-options", "SAMEORIGIN")
|
||||||
|
w.Header().Set("x-content-type", "nosniff")
|
||||||
|
w.Header().Set("x-xss-protection", "1; mode=block")
|
||||||
|
|
||||||
// Checks if the User is allowed to access this file
|
// Checks if the User is allowed to access this file
|
||||||
if !user.Allowed(strings.TrimPrefix(r.URL.Path, c.BaseURL)) {
|
if !user.Allowed(strings.TrimPrefix(r.URL.Path, c.BaseURL)) {
|
||||||
if r.Method == http.MethodGet {
|
if r.Method == http.MethodGet {
|
||||||
|
|
Loading…
Reference in New Issue