aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.go')
-rw-r--r--src/http.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/http.go b/src/http.go
index b0d5bcd..00078c9 100644
--- a/src/http.go
+++ b/src/http.go
@@ -34,7 +34,11 @@ func Run(port int) {
mux.Handle("GET /favicon.ico", fs)
mux.Handle("GET /fonts/", fs)
mux.Handle("GET /storage/", fs)
- mux.Handle("GET /style.min.css", fs)
+ if Debugp {
+ mux.Handle("GET /style.css", fs)
+ } else {
+ mux.Handle("GET /style.min.css", fs)
+ }
mux.Handle("GET /coins/designs", mwareC(final))
mux.Handle("GET /coins/mintages", mwareM(final))
mux.Handle("GET /collecting/crh", mwareC(final))
@@ -57,7 +61,8 @@ func chain(xs ...middleware) middleware {
func firstHandler(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx := context.WithValue(r.Context(), "td", &templateData{})
+ ctx := context.WithValue(r.Context(), "td",
+ &templateData{Debugp: Debugp})
next.ServeHTTP(w, r.WithContext(ctx))
})
}