diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/anubis.go | 2 | ||||
| -rw-r--r-- | lib/anubis_test.go | 2 |
2 files changed, 2 insertions, 2 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) { diff --git a/lib/anubis_test.go b/lib/anubis_test.go index 90d2cdf..58c8834 100644 --- a/lib/anubis_test.go +++ b/lib/anubis_test.go @@ -47,7 +47,7 @@ func TestCookieSettings(t *testing.T) { CookieName: t.Name(), }) - ts := httptest.NewServer(internal.DefaultXRealIP("127.0.0.1", srv)) + ts := httptest.NewServer(internal.RemoteXRealIP(true, "tcp", srv)) defer ts.Close() cli := &http.Client{ |
