Procházet zdrojové kódy

http fileserver should strip path

Alexander Belanger před 5 roky
rodič
revize
c6775f90b6
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      server/router/router.go

+ 1 - 1
server/router/router.go

@@ -51,7 +51,7 @@ func New(
 
 
 	r.Get("/*", func(w http.ResponseWriter, r *http.Request) {
 	r.Get("/*", func(w http.ResponseWriter, r *http.Request) {
 		if _, err := os.Stat(staticFilePath + r.RequestURI); os.IsNotExist(err) {
 		if _, err := os.Stat(staticFilePath + r.RequestURI); os.IsNotExist(err) {
-			http.StripPrefix(r.RequestURI, fs).ServeHTTP(w, r)
+			http.StripPrefix(r.URL.Path, fs).ServeHTTP(w, r)
 		} else {
 		} else {
 			fs.ServeHTTP(w, r)
 			fs.ServeHTTP(w, r)
 		}
 		}