summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-11-15 21:06:06 +0100
committerclsr <clsr@clsr.net>2016-11-15 21:06:06 +0100
commit5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25 (patch)
treee9c41e3bd1b025576536408801303c61831d92a3
parent1dd9e1840cee0bdbca5e63a911151a0d530b8bcc (diff)
downloadgomf-modpanel-5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25.tar.gz
gomf-modpanel-5f583f99d29cbb7578e43b2bbc0a2de87a5b4a25.zip
Do not require auth to view deletion log or static files
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
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
}