lukeed / sirv

An optimized middleware & CLI application for serving static files~!
MIT License
1.06k stars 56 forks source link

Support filenames that end with `+` #159

Open hyunbinseo opened 7 months ago

hyunbinseo commented 7 months ago

Filenames such as a+.txt are not served because of the following line.

https://github.com/lukeed/sirv/blob/50b1964b8a8342e14a711d47f793298c2a7aeeb7/packages/sirv/index.js#L155

  1. Why are filenames with +. filtered out?
  2. There seems to be a duplicate + in the character-set.
- (^\.|[\\+|\/+]\.)
+ (^\.|[\\+|\/]\.)