-
-
Notifications
You must be signed in to change notification settings - Fork 62
Support for "." in pathnames #132
Copy link
Copy link
Open
Description
Problem
I have a single page app with routes to specific versions of documents
Example path from my app: /documents/:documentName/:version/:langVariant
Example match for the path: /documents/document1/1.8.3/en
Sirv chokes on the . character and throws a 404 thinking that everything after the last period is a file extension.
Suggestion
Changing the regex on line: 136 in package/sirv/index.js from
ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/); // any extnto something around the lines of
ignores.push(/[/]([A-Za-z\s\d~$._-]+\.[\w]+)[^.\d(?=\/\n)]{1,}$/); // any extnseems to work for this.
Matches for the suggested regex:
Matches:
/style.js
/assets/style.js
/assets/fonts/font.ttf
/assets/zip/files.7zip
Doesnt match:
/documents/1.8.3/en
/documents/1.2.3
/documents/1317983
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels