cloudhead / node-static

rfc 2616 compliant HTTP static-file server module, with built-in caching.
MIT License
2.17k stars 245 forks source link

SPA mode is failing if `.` is in URL #203

Closed gjuchault closed 3 years ago

gjuchault commented 6 years ago

As you're using if (argv['spa'] && request.url.indexOf(".") == -1) { (which is here because you want to 404 on real files not found).

But ! If we use query string parameters with . inside, such as:

url.com/path/subpath?email=john.cena@gmail.com

then it matches the indexOf, while we still want the path to resolve as SPA.

I might open a PR when I have some time.

gjuchault commented 6 years ago

PR opened: #204

brettz9 commented 3 years ago

Closed by #227.