具有路径变量的静态文件处理程序在Gorilla Mux中导致404错误

I need to use path variables in conjunction with a static file handler using Gorilla Mux, but I can't find any examples of how to do that.

Here's a working file handler without the path variables:

r := mux.NewRouter()
r.PathPrefix("/discovery").Handler(http.StripPrefix("/discovery", http.FileServer(http.Dir("static/dist")))).Methods("GET")
http.Handle("/", r)

I tried adding the path variables, like this:

r.PathPrefix("/discovery/{type}/{value}").Handler(http.StripPrefix("/discovery", http.FileServer(http.Dir("static/dist")))).Methods("GET")

But then /discovery gives a 404 error. I need to match paths like:

/discovery

/discovery/hash/umbrella

And they all need to point to the path "static/dist", so the logic can be passed along to React Router.