From 5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25 Mon Sep 17 00:00:00 2001 From: clsr Date: Tue, 15 Nov 2016 21:06:06 +0100 Subject: Do not require auth to view deletion log or static files --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9d499ba..37d5374 100644 --- a/main.go +++ b/main.go @@ -288,7 +288,11 @@ func handleDeletionLog(w http.ResponseWriter, r *http.Request) { } func handle(w http.ResponseWriter, r *http.Request) { - if !strings.HasPrefix(r.URL.Path, prefix) && r.URL.Path != deletionPath { + if r.URL.Path == deletionPath || strings.HasPrefix(r.URL.Path, prefix+"static/") { + http.DefaultServeMux.ServeHTTP(w, r) + } + + if !strings.HasPrefix(r.URL.Path, prefix) { errorResponse(w, http.StatusNotFound, http.StatusText(http.StatusNotFound)) return } -- cgit