aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHenri Vasserman <henv@hot.ee>2025-03-28 19:52:14 +0200
committerGitHub <noreply@github.com>2025-03-28 13:52:14 -0400
commit38d62eeb5676d010a08c439fdcedb4741c021bff (patch)
tree7ce2fa83ca860a4fce016c0560c243d62c5e3c0d /lib
parent57c3e9f1b2c1d685472670b8ba2660144d2ae316 (diff)
downloadanubis-38d62eeb5676d010a08c439fdcedb4741c021bff.tar.xz
anubis-38d62eeb5676d010a08c439fdcedb4741c021bff.zip
Hide directory browsing on the static content (#85)
* Hide directory browsing on the static content * update changelog
Diffstat (limited to 'lib')
-rw-r--r--lib/anubis.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/anubis.go b/lib/anubis.go
index 83e04dd..8d5dac1 100644
--- a/lib/anubis.go
+++ b/lib/anubis.go
@@ -119,7 +119,7 @@ func New(opts Options) (*Server, error) {
mux := http.NewServeMux()
xess.Mount(mux)
- mux.Handle(anubis.StaticPath, internal.UnchangingCache(http.StripPrefix(anubis.StaticPath, http.FileServerFS(web.Static))))
+ mux.Handle(anubis.StaticPath, internal.UnchangingCache(internal.NoBrowsing(http.StripPrefix(anubis.StaticPath, http.FileServerFS(web.Static)))))
if opts.ServeRobotsTXT {
mux.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) {