Parcourir la source

http fileserver should strip path

Alexander Belanger il y a 5 ans
Parent
commit
c6775f90b6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)
 		}
 		}