summaryrefslogtreecommitdiffstats
path: root/commands/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/server.go')
-rw-r--r--commands/server.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/server.go b/commands/server.go
index 7689f03db..06b7612fc 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -400,13 +400,14 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string
}
// Ignore any query params for the operations below.
- requestURI := strings.TrimSuffix(r.RequestURI, "?"+r.URL.RawQuery)
+ requestURI, _ := url.PathUnescape(strings.TrimSuffix(r.RequestURI, "?"+r.URL.RawQuery))
for _, header := range f.c.serverConfig.MatchHeaders(requestURI) {
w.Header().Set(header.Key, header.Value)
}
if redirect := f.c.serverConfig.MatchRedirect(requestURI); !redirect.IsZero() {
+ // fullName := filepath.Join(dir, filepath.FromSlash(path.Clean("/"+name)))
doRedirect := true
// This matches Netlify's behaviour and is needed for SPA behaviour.
// See https://docs.netlify.com/routing/redirects/rewrites-proxies/