tobychui 4 роки тому
батько
коміт
76df77cccf
2 змінених файлів з 3 додано та 3 видалено
  1. 2 2
      main.go
  2. 1 1
      main.router.go

+ 2 - 2
main.go

@@ -114,10 +114,10 @@ func main() {
 	fs := http.FileServer(http.Dir("./web"))
 	if *enable_gzip {
 		//Gzip enabled. Always serve with gzip if header exists
-		http.Handle("/", gzipmiddleware.Compress(mroutner(fs)))
+		http.Handle("/", gzipmiddleware.Compress(mrouter(fs)))
 	} else {
 		//Normal file server without gzip
-		http.Handle("/", mroutner(fs))
+		http.Handle("/", mrouter(fs))
 	}
 
 	//Set database read write to ReadOnly after startup if demo mode

+ 1 - 1
main.router.go

@@ -16,7 +16,7 @@ import (
 	fs "imuslab.com/arozos/mod/filesystem"
 )
 
-func mroutner(h http.Handler) http.Handler {
+func mrouter(h http.Handler) http.Handler {
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		/*
 			You can also check the path for url using r.URL.Path