New file regex.

The old regex was hard to parse and maintain, and was broken for some
edge cases. Simplified it greatly and seems to work fine!
This commit is contained in:
Gabriel Simmer 2020-04-11 22:43:03 +01:00
parent a686cb8c53
commit 1ba1a14807
No known key found for this signature in database
GPG key ID: 33BA4D83B160A0A9

View file

@ -58,7 +58,7 @@ func Init() *mux.Router {
HandleProvider(),
)).Methods("GET", "POST")
r.Handle(`/api/files/{provider:[a-zA-Z0-9]+}/{file:[a-zA-Z0-9=\-\/\s.,&_+]+}`, Handle(
r.Handle(`/api/files/{provider:[a-zA-Z0-9]+}/{file:.+}`, Handle(
HandleProvider(),
)).Methods("GET", "POST")