diff options
author | clsr <clsr@clsr.net> | 2016-11-15 21:06:06 +0100 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-11-15 21:06:06 +0100 |
commit | 5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25 (patch) | |
tree | e9c41e3bd1b025576536408801303c61831d92a3 | |
parent | 1dd9e1840cee0bdbca5e63a911151a0d530b8bcc (diff) | |
download | gomf-modpanel-5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25.tar.gz gomf-modpanel-5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25.zip |
Do not require auth to view deletion log or static files
-rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 } |